aboutsummaryrefslogtreecommitdiffstats
path: root/packages/testnet-faucets/gulpfile.js
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-11 20:25:47 +0800
committerFabio Berger <me@fabioberger.com>2018-10-11 20:25:47 +0800
commit295a8c760a6d5b567a12d6a2d83ae73021ea343c (patch)
treefaf6810a6b5b810869e36c20641fd4fe25e03ddb /packages/testnet-faucets/gulpfile.js
parent9b147f14955c5f6a0b38e03ae30ac13b1be183d1 (diff)
parent1cfcc82ea9869e14c1a1b78e1376c89fdbeb91f4 (diff)
downloaddexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar.gz
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar.bz2
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar.lz
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar.xz
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar.zst
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.zip
merge dev-section-redesign
Diffstat (limited to 'packages/testnet-faucets/gulpfile.js')
-rw-r--r--packages/testnet-faucets/gulpfile.js35
1 files changed, 17 insertions, 18 deletions
diff --git a/packages/testnet-faucets/gulpfile.js b/packages/testnet-faucets/gulpfile.js
index 7c4e25e0f..839ef851b 100644
--- a/packages/testnet-faucets/gulpfile.js
+++ b/packages/testnet-faucets/gulpfile.js
@@ -14,10 +14,7 @@ const config = {
},
devtool: 'source-map',
resolve: {
- modules: [
- path.join(__dirname, '/src/ts'),
- 'node_modules',
- ],
+ modules: [path.join(__dirname, '/src/ts'), 'node_modules'],
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
alias: {
ts: path.join(__dirname, '/src/ts'),
@@ -44,10 +41,10 @@ const config = {
}),
],
externals: nodeExternals({
- modulesDir: path.join(__dirname, '../../node_modules')
+ modulesDir: path.join(__dirname, '../../node_modules'),
}),
watchOptions: {
- ignored: /server|node_modules|transpiled/
+ ignored: /server|node_modules|transpiled/,
},
};
@@ -77,16 +74,18 @@ gulp.task('run', ['watch'], function() {
});
function onBuild(done) {
- return function(err, stats) {
- if(err) {
- console.log('Error', err);
- }
- else {
- console.log(stats.toString());
- }
-
- if(done) {
- done();
- }
- }
+ return function(err, stats) {
+ if (err) {
+ console.log('Error', err);
+ process.exit(1);
+ } else {
+ console.log(stats.toString());
+ }
+ if (done) {
+ if (stats.compilation.errors && stats.compilation.errors.length > 0) {
+ process.exit(1);
+ }
+ done();
+ }
+ };
}