From 3faeb628fdb2576de83c37fc8ed49852802fad28 Mon Sep 17 00:00:00 2001 From: Kevin Jahns <kevin.jahns@rwth-aachen.de> Date: Thu, 12 Nov 2015 20:42:58 +0100 Subject: [PATCH] updated dist build process --- dist | 2 +- gulpfile.helper.js | 8 ++++---- gulpfile.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist b/dist index dcf62124..acfce069 160000 --- a/dist +++ b/dist @@ -1 +1 @@ -Subproject commit dcf62124363cabd3665a2487b8cf18b23c655ba3 +Subproject commit acfce069121920c349b2678b2e1b6d0f1a62b45b diff --git a/gulpfile.helper.js b/gulpfile.helper.js index b45e18ff..49f9bd34 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 8fcf38bb..6c539c71 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', -- GitLab