[fix]: [testnet-faucet] Exit 1 on build fail
If we detect any compilation errors then exit with 1
This commit is contained in:
parent
afb34da729
commit
01ccd8ff1a
@ -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/,
|
||||
},
|
||||
};
|
||||
|
||||
@ -78,15 +75,17 @@ gulp.task('run', ['watch'], function() {
|
||||
|
||||
function onBuild(done) {
|
||||
return function(err, stats) {
|
||||
if(err) {
|
||||
if (err) {
|
||||
console.log('Error', err);
|
||||
}
|
||||
else {
|
||||
process.exit(1);
|
||||
} else {
|
||||
console.log(stats.toString());
|
||||
}
|
||||
|
||||
if(done) {
|
||||
if (done) {
|
||||
if (stats.compilation.errors && stats.compilation.errors.length > 0) {
|
||||
process.exit(1);
|
||||
}
|
||||
done();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user