mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-03-16 22:10:32 +00:00
Build: Let the user know about minification errors
And exit(1).
This commit is contained in:
parent
471dfed3c6
commit
c99d5aeae5
1 changed files with 5 additions and 2 deletions
7
build.js
7
build.js
|
|
@ -234,9 +234,12 @@ else {
|
|||
console.log('Built distribution to dist/all.js');
|
||||
|
||||
exec(mininfierCmd, function (error, output) {
|
||||
if (!error) {
|
||||
console.log('Minified using', minifier, 'to dist/all.min.js');
|
||||
if (error) {
|
||||
console.error('Minification failed using', minifier, 'with', mininfierCmd);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('Minified using', minifier, 'to dist/all.min.js');
|
||||
|
||||
exec('gzip -c dist/all.min.js > dist/all.min.js.gz', function (error, output) {
|
||||
console.log('Gzipped to dist/all.min.js.gz');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue