mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
updated npm and cleanup gulp tasks
This commit is contained in:
parent
a80b17e011
commit
141e68f686
8 changed files with 636 additions and 752 deletions
|
|
@ -17,22 +17,14 @@ const webpackError = (err) => {
|
|||
|
||||
const webpackCallback = (done) => (err, stats) => {
|
||||
if (err) {
|
||||
if (config.watch) {
|
||||
webpackError(err);
|
||||
} else {
|
||||
throw new gutil.PluginError('webpack', err);
|
||||
}
|
||||
throw new gutil.PluginError('webpack', err);
|
||||
} else if (stats && stats.compilation && stats.compilation.errors && stats.compilation.errors[0]) {
|
||||
if (config.watch) {
|
||||
stats.compilation.errors.forEach(webpackError);
|
||||
} else {
|
||||
throw new gutil.PluginError('webpack', stats.compilation.errors[0]);
|
||||
}
|
||||
throw new gutil.PluginError('webpack', stats.compilation.errors[0]);
|
||||
}
|
||||
|
||||
done();
|
||||
};
|
||||
|
||||
exports.webpack = (done) => {
|
||||
webpack(webpackCfgBuilder(config.paths.staticJS, !config.community, 'production'), webpackCallback(done));
|
||||
webpack(webpackCfgBuilder(config.paths.staticJS, 'production'), webpackCallback(done));
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue