}
}
catch (e) {
- process.stderr.write('Error: Could not parse JSON value \'' + value + '\'');
- cli.exit(1);
+ cli.fatal('Could not parse JSON value \'' + value + '\'');
}
if (jsonArray instanceof Array) {
return jsonArray;
}
catch (e) {
status = 3;
- process.stderr.write('Error: Minification error');
- process.stderr.write('\n' + e);
+ cli.error('Minification error');
+ process.stderr.write(e);
}
if (minifyOptions.lint) {
}
catch (e) {
status = 4;
- process.stderr.write('Error: Cannot write to output');
+ cli.error('Cannot write to output');
}
}
}
if (options.version) {
- process.stderr.write(appName + ' v' + appVersion);
+ cli.output(appName + ' v' + appVersion);
cli.exit(0);
}
}
}
catch (e) {
- process.stderr.write('Error: Cannot read the specified config file');
- cli.exit(1);
+ cli.fatal('Cannot read the specified config file');
}
}
original += fs.readFileSync(afile, 'utf8');
}
catch (e) {
- process.stderr.write('Error: Cannot read file ' + afile);
+ cli.error('Cannot read file ' + afile);
cli.exit(2);
}
});