Skip to content

Commit f33153f

Browse files
committed
Update babel procedure in gulp
1 parent 58be0dc commit f33153f

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.babelrc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
// with options
22
{
33
"presets": [
4-
[ "env", {
5-
"browsers": [
4+
[ "@babel/preset-env", {
5+
"targets": [
66
"last 2 versions",
77
"ie >= 9",
88
"safari >= 8",
99
"firefox >= 40",
1010
"chrome >= 40",
11-
"chromium >= 40"
11+
"electron >= 6"
1212
],
1313
"modules": false,
1414
"debug": true,
15-
"useBuiltIns": true
15+
"useBuiltIns": "entry"
1616
}]
17+
],
18+
"plugins": [
19+
"@babel/plugin-transform-classes"
1720
]
18-
}
21+
}

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ gulp.task('index', () => {
4444
}
4545
return gulp.src('./')
4646
.pipe(exec('./node_modules/browserify/bin/cmd.js --standalone "OpenTimestamps" index.js > ./dist/opentimestamps.es6.js', options))
47-
.pipe(exec('./node_modules/babel-cli/bin/babel.js ./dist/opentimestamps.es6.js -o ./dist/opentimestamps.js', options))
47+
.pipe(exec('./node_modules/.bin/babel ./dist/opentimestamps.es6.js -o ./dist/opentimestamps.js', options))
4848
.pipe(exec.reporter(reportOptions))
4949

5050
/* NOTE: babelify run babel with .babelrc file, but doesn't convert the code

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
"devDependencies": {
2020
"@babel/cli": "^7.8.3",
2121
"@babel/core": "^7.8.3",
22-
"babel-plugin-transform-es2015-classes": "^6.24.1",
23-
"babel-preset-env": "^1.6.1",
24-
"babel-preset-es2015": "^6.24.1",
22+
"@babel/plugin-transform-classes": "^7.8.3",
23+
"@babel/preset-env": "^7.8.3",
2524
"babelify": "^7.3.0",
2625
"browserify": "13.0.0",
2726
"faucet": "0.0.1",

0 commit comments

Comments
 (0)