Browse Source

Remove promise version comment

gh-438-b
Bogdan Chadkin 9 years ago
parent
commit
f2e950914e
  1. 25
      src/utils/transformBundle.js

25
src/utils/transformBundle.js

@ -1,5 +1,3 @@
// import Promise from 'es6-promise/lib/es6-promise/promise.js';
export default function transformBundle ( source, transformers ) {
if ( typeof source === 'string' ) {
source = {
@ -27,27 +25,4 @@ export default function transformBundle ( source, transformers ) {
return result;
}, source );
// Promisified version
// return transformers.reduce( ( promise, transformer ) => {
// return promise.then( previous => {
// return Promise.resolve( transformer( previous ) ).then( result => {
// if ( result == null ) return previous;
// if ( typeof result === 'string' ) {
// result = {
// code: result,
// map: null
// };
// }
// // `result.map` can only be a string if `result` isn't
// else if ( typeof result.map === 'string' ) {
// result.map = JSON.parse( result.map );
// }
// return result;
// });
// });
// }, Promise.resolve( source ) );
}

Loading…
Cancel
Save