Skip to content

Commit c489349

Browse files
committed
feat(babel): update to babel 7, update hot reload system, transpile node_modules (stable only)
1 parent 776ef82 commit c489349

File tree

16 files changed

+2941
-513
lines changed

16 files changed

+2941
-513
lines changed

.es.babelrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.lib.babelrc

Lines changed: 0 additions & 15 deletions
This file was deleted.

.npmignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/.gitignore
22
/.gitattributes
33
/.eslintrc
4+
/.eslintignore
45
/.editorconfig
56
/.travis.yml
67
/appveyor.yml
@@ -9,6 +10,5 @@
910
/.build
1011
/app
1112
/public
12-
/.es.babelrc
13-
/.eslintignore
1413
*.log
14+
/gulpfile.js

argv.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

gulpfile.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
/* eslint-disable import/no-commonjs */
22

3-
const fs = require('fs');
43
const gulp = require('gulp');
54
const watch = require('gulp-watch');
65
const plumber = require('gulp-plumber');
76
const babel = require('gulp-babel');
87
const del = require('del');
98

9+
const FRAMEWORK_BABEL_PRESET = `${__dirname}/src/internals/babel/internal-babel-preset`;
10+
1011
// ====== Lib build ======
1112
// Transpile to ES5
1213

13-
const libBabelRc = JSON.parse(fs.readFileSync('./.lib.babelrc'));
14-
1514
gulp.task('clean-lib', () => {
1615
return del(['./lib']);
1716
});
@@ -25,16 +24,18 @@ gulp.task('copy-lib', ['clean-lib'], () => {
2524
gulp.task('build-lib', ['copy-lib'], () => {
2625
return gulp.src('./src/**/*.js')
2726
.pipe(plumber())
28-
.pipe(babel(libBabelRc))
27+
.pipe(babel({
28+
presets: [
29+
[FRAMEWORK_BABEL_PRESET, { buildEsModules: true }],
30+
],
31+
}))
2932
.pipe(plumber.stop())
3033
.pipe(gulp.dest('./lib'));
3134
});
3235

3336
// ====== ES build ======
3437
// Like Lib but doesn't transform import statements.
3538

36-
const esBabelRc = JSON.parse(fs.readFileSync('./.es.babelrc'));
37-
3839
gulp.task('clean-es', () => {
3940
return del(['./es']);
4041
});
@@ -48,7 +49,11 @@ gulp.task('copy-es', ['clean-es'], () => {
4849
gulp.task('build-es', ['copy-es'], () => {
4950
return gulp.src('./src/**/*.js')
5051
.pipe(plumber())
51-
.pipe(babel(esBabelRc))
52+
.pipe(babel({
53+
presets: [
54+
[FRAMEWORK_BABEL_PRESET, { buildEsModules: false }],
55+
],
56+
}))
5257
.pipe(plumber.stop())
5358
.pipe(gulp.dest('./es'));
5459
});

locale.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)