mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
9a4f6619d9
This is the last version of the 6.x babel branch. To achieve this I used https://github.com/babel/babel-standalone witht he following patch: diff --git a/gulpfile.js b/gulpfile.js index 2121b5f..c40bfa3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -74,24 +74,23 @@ const minifyAndRename = lazypipe() .pipe(uglify) .pipe(rename, { extname: '.min.js' }); -gulp.task('default', ['build']); -gulp.task('build', ['build-babel', 'build-babili']); - -gulp.task('build-babel', cb => { - pump([ - gulp.src('src/index.js'), - webpackBuild('babel.js', 'Babel', require('./package.json').version), - gulp.dest('.'), - minifyAndRename(), - gulp.dest('.'), - ], cb); -}); -gulp.task('build-babili', cb => { - pump([ - gulp.src('src/babili.js'), - webpackBuild('babili.js', 'Babili', require('./packages/babili-standalone/package.json').version), - gulp.dest('packages/babili-standalone/'), - minifyAndRename(), - gulp.dest('packages/babili-standalone/'), - ], cb); -}); + gulp.task('build-babel', gulp.series(cb => { + pump([ + gulp.src('src/index.js'), + webpackBuild('babel.js', 'Babel', require('./package.json').version), + gulp.dest('.'), + minifyAndRename(), + gulp.dest('.'), + ], cb); + })); + gulp.task('build-babili', gulp.series(cb => { + pump([ + gulp.src('src/babili.js'), + webpackBuild('babili.js', 'Babili', require('./packages/babili-standalone/package.json').version), + gulp.dest('packages/babili-standalone/'), + minifyAndRename(), + gulp.dest('packages/babili-standalone/'), + ], cb); + })); +gulp.task('build', gulp.series('build-babel', 'build-babili')); +gulp.task('default', gulp.series('build')); diff --git a/package.json b/package.json index f2414d2..854cfad 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "url": "git+https://github.com/Daniel15/babel-standalone.git" }, "devDependencies": { - "babel-core": "6.26.0", + "babel-core": "6.26.3", "babel-helper-builder-react-jsx": "6.23.0", "babel-loader": "6.4.1", "babel-plugin-check-es2015-constants": "6.22.0", @@ -123,7 +123,7 @@ "babel-preset-stage-1": "6.24.1", "babel-preset-stage-2": "6.24.1", "babel-preset-stage-3": "6.24.1", - "gulp": "^3.9.1", + "gulp": "^4", "gulp-rename": "^1.2.2", "gulp-uglify": "^2.0.1", "jest": "^18.1.0", and then ran: yarn yarn run build |
||
---|---|---|
.. | ||
assets | ||
data |