Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var getFile = function(filePath) {
filePath = 'test/' + filePath;
return new gutil.File({
path: filePath,
cwd: 'test/',
base: path.dirname(filePath),
contents: null
});
};
browser.quit(function() {
if (selenium.kill) {
selenium.kill();
}
stream.emit('error', new gutil.PluginError('gulp-mocha', err));
cb();
});
}
function emitError(messageOrErr) {
var opts = {showStack: true};
var err = new gutil.PluginError(PLUGIN_NAME, messageOrErr, opts);
s.emit('error', err);
}
}
function endStream() {
var generatedCss = tailor.generateLazy(options);
var cssContent = options.minifyOutput ? generatedCss.minified : generatedCss.formatted;
var outputFile = new gutil.File({
cwd: firstFile.cwd,
base: firstFile.base,
path: path.join(firstFile.base, options.filename),
contents: new Buffer(cssContent)
});
this.push(outputFile);
this.emit('data', outputFile);
this.emit('end');
}
webpack(wparg).run(function(err, stats) {
if (err !== null) {
throw new gutil.PluginError('webpack', err);
}
var statsString = stats.toString({chunks: false});
if (stats.hasErrors() === true) {
throw new gutil.PluginError('webpack', statsString);
}
gutil.log('[webpack]', statsString);
callback();
});
});
function logErr(message) {
var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
util.log(util.colors.red('[monaco.d.ts]'), 'WHILE HANDLING RULE: ', CURRENT_PROCESSING_RULE);
util.log.apply(util, [util.colors.red('[monaco.d.ts]'), message].concat(rest));
}
function moduleIdToPath(out, moduleId) {
function handler(err, stats) {
if (err) {
return callback(new gulpUtil.PluginError('webpack', err));
}
if (global.parameters.argv.verbose) {
gulpUtil.log('[webpack]', stats.toString({colors: true}));
}
if (!started) {
started = true;
return callback();
}
}
function logError(err) {
if (err.fileName) {
gutil.log(gutil.colors.red('Error'), err.fileName, lookupErrorLine(err));
} else if (err.message) {
gutil.log(gutil.colors.red('Error'), err.message);
} else {
gutil.log(gutil.colors.red('Error'), err);
}
}
server.close(function() {
gutil.log('backup-generator:', 'backups saved: ', gutil.colors.cyan(numSaved), 'backups skipped: ', gutil.colors.magenta(numSkipped), 'backups failed: ', gutil.colors.red(numFailed));
cb();
});
});
gulp.task('start', function () {
setEnv();
setVersion();
setPaths();
gutil.log(gutil.colors.green('------------------------------'));
gutil.log(gutil.colors.green('-'), ' Env:', gutil.colors.yellow(config.env));
gutil.log(gutil.colors.green('-'), ' Debug:', gutil.colors.yellow(config.debug));
gutil.log(gutil.colors.green('-'), 'Version:', gutil.colors.yellow(config.version));
gutil.log(gutil.colors.green('------------------------------'));
});