diff --git a/dist b/dist index dcf62124363cabd3665a2487b8cf18b23c655ba3..acfce069121920c349b2678b2e1b6d0f1a62b45b 160000 --- a/dist +++ b/dist @@ -1 +1 @@ -Subproject commit dcf62124363cabd3665a2487b8cf18b23c655ba3 +Subproject commit acfce069121920c349b2678b2e1b6d0f1a62b45b diff --git a/gulpfile.helper.js b/gulpfile.helper.js index b45e18ff8cdb78606d652df7d869702b0be7c07f..49f9bd34d01c8b0915a0f8c8d55ddebdd06c3d0e 100644 --- a/gulpfile.helper.js +++ b/gulpfile.helper.js @@ -32,10 +32,10 @@ module.exports = function (gulp, helperOptions) { modules: 'ignore', experimental: true } - if (options.regenerator) { - files.specs = helperOptions.polyfills.concat(files.specs) - } else { + if (!options.regenerator) { babelOptions.blacklist = 'regenerator' + } else { + files.dist = [files.dist].concat(helperOptions.polyfills) } gulp.task('dist', function () { @@ -54,7 +54,7 @@ module.exports = function (gulp, helperOptions) { .pipe(source(options.targetName)) .pipe(buffer()) .pipe($.if(options.debug, $.sourcemaps.init({loadMaps: true}))) - .pipe($.if(!options.debug && options.regenerator, $.babel(babelOptions))) + .pipe($.if(true, $.babel(babelOptions))) .pipe($.if(!options.debug && options.regenerator, $.uglify())) .pipe($.if(options.debug, $.sourcemaps.write('.'))) .pipe(gulp.dest('./dist/')) diff --git a/gulpfile.js b/gulpfile.js index 8fcf38bba41a427b0bc6cefdc313fad0e3fac3ac..6c539c71dcd5310e3adfa46991c5ea889e3063d6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -48,7 +48,7 @@ var $ = require('gulp-load-plugins')() var runSequence = require('run-sequence').use(gulp) require('./gulpfile.helper.js')(gulp, { - polyfills: [], + polyfills: ['node_modules/gulp-babel/node_modules/babel-core/node_modules/regenerator/runtime.js'], entry: './src/y.js', targetName: 'y.js', moduleName: 'yjs',