Skip to content
Snippets Groups Projects
Commit 3faeb628 authored by Kevin Jahns's avatar Kevin Jahns
Browse files

updated dist build process

parent d1e30c50
No related branches found
No related tags found
No related merge requests found
Subproject commit dcf62124363cabd3665a2487b8cf18b23c655ba3
Subproject commit acfce069121920c349b2678b2e1b6d0f1a62b45b
......@@ -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/'))
......
......@@ -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',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment