clear
This commit is contained in:
22
node_modules/gulp-uglify/lib/create-error.js
generated
vendored
Normal file
22
node_modules/gulp-uglify/lib/create-error.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
var PluginError = require('gulp-util/lib/PluginError');
|
||||
|
||||
var pluginName = 'gulp-uglify';
|
||||
|
||||
module.exports = function createError(file, err) {
|
||||
if (typeof err === 'string') {
|
||||
return new PluginError(pluginName, file.path + ': ' + err, {
|
||||
fileName: file.path,
|
||||
showStack: false
|
||||
});
|
||||
}
|
||||
|
||||
var msg = err.message || err.msg || 'unspecified error';
|
||||
|
||||
return new PluginError(pluginName, file.path + ': ' + msg, {
|
||||
fileName: file.path,
|
||||
lineNumber: err.line,
|
||||
stack: err.stack,
|
||||
showStack: false
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user