Skip to content

Commit

Permalink
Merge pull request #10 from ryym/fix-build
Browse files Browse the repository at this point in the history
Fix build
  • Loading branch information
ryym authored Jun 26, 2019
2 parents fa6e03a + 63dfbbf commit 91f6d4c
Show file tree
Hide file tree
Showing 4 changed files with 618 additions and 94 deletions.
10 changes: 9 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
module.exports = {
plugins: ['babel-plugin-espower', '@babel/plugin-transform-modules-commonjs'],
plugins: ['babel-plugin-espower'],
presets: [
[
'@babel/preset-env',
{
targets: { node: true },
},
],
],
ignore: ['./build/*.js'],
};
6 changes: 5 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ function runAndWatch(watchPattern, initialValue, task) {
return task(initialValue);
}

gulp.task('test:prepare', () => {
gulp.task('test:prepare', ['build'], () => {
const mochaEach = require('./build');
if (typeof mochaEach !== 'function') {
throw new Error('Unexpected exports from compiled code');
}
require('@babel/register');
});

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/plugin-transform-modules-commonjs": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/register": "^7.4.4",
"babel-plugin-espower": "^3.0.1",
"coveralls": "^2.11.6",
Expand All @@ -43,7 +43,7 @@
"eslint-plugin-markdown": "^1.0.0",
"glob": "^7.0.0",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-babel": "^8.0.0",
"mocha": "^3.2.0",
"nyc": "^10.2.0",
"power-assert": "^1.2.0",
Expand All @@ -52,6 +52,7 @@
"nyc": {
"exclude": [
"gulpfile.js",
"build/*",
"test/**/*"
]
}
Expand Down
Loading

0 comments on commit 91f6d4c

Please sign in to comment.