Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function execute(opts, env, config) {
var tasks = opts._;
var toRun = tasks.length ? tasks : ['default'];
if (opts.tasksSimple || opts.tasks || opts.tasksJson) {
// Mute stdout if we are listing tasks
stdout.mute();
}
var gulpInst = require(env.modulePath);
logEvents(gulpInst);
logSyncTask(gulpInst);
// This is what actually loads up the gulpfile
var exported = require(env.configPath);
registerExports(gulpInst, exported);
// Always unmute stdout after gulpfile is required
stdout.unmute();
process.nextTick(function() {
var tree;
function execute(opts, env, config) {
var tasks = opts._;
var toRun = tasks.length ? tasks : ['default'];
if (opts.tasksSimple || opts.tasks || opts.tasksJson) {
// Mute stdout if we are listing tasks
stdout.mute();
}
// This is what actually loads up the gulpfile
var exported = require(env.configPath);
log.info('Using gulpfile', ansi.magenta(tildify(env.configPath)));
var gulpInst = require(env.modulePath);
logEvents(gulpInst);
registerExports(gulpInst, exported);
// Always unmute stdout after gulpfile is required
stdout.unmute();
process.nextTick(function() {
var tree;
function execute(opts, env, config) {
var tasks = opts._;
var toRun = tasks.length ? tasks : ['default'];
if (opts.tasksSimple || opts.tasks || opts.tasksJson) {
// Mute stdout if we are listing tasks
stdout.mute();
}
var gulpInst = require(env.modulePath);
logEvents(gulpInst);
logSyncTask(gulpInst);
// This is what actually loads up the gulpfile
var exported = require(env.configPath);
registerExports(gulpInst, exported);
// Always unmute stdout after gulpfile is required
stdout.unmute();
process.nextTick(function() {
var tree;
if (opts.tasksSimple || opts.tasks || opts.tasksJson) {
// Mute stdout if we are listing tasks
stdout.mute();
}
var gulpInst = require(env.modulePath);
logEvents(gulpInst);
logSyncTask(gulpInst);
// This is what actually loads up the gulpfile
var exported = require(env.configPath);
registerExports(gulpInst, exported);
// Always unmute stdout after gulpfile is required
stdout.unmute();
process.nextTick(function() {
var tree;
if (opts.tasksSimple) {
tree = gulpInst.tree();
return logTasksSimple(tree.nodes);
}
if (opts.tasks) {
tree = gulpInst.tree({ deep: true });
if (config.description && typeof config.description === 'string') {
tree.label = config.description;
} else {
tree.label = 'Tasks for ' + color.highlight(tildify(env.configPath));
}
if (opts.tasksSimple || opts.tasks || opts.tasksJson) {
// Mute stdout if we are listing tasks
stdout.mute();
}
var gulpInst = require(env.modulePath);
logEvents(gulpInst);
logSyncTask(gulpInst);
// This is what actually loads up the gulpfile
var exported = require(env.configPath);
registerExports(gulpInst, exported);
// Always unmute stdout after gulpfile is required
stdout.unmute();
process.nextTick(function() {
var tree;
if (opts.tasksSimple) {
return logTasksSimple(gulpInst.tree());
}
if (opts.tasks) {
tree = {};
if (config.description && typeof config.description === 'string') {
tree.label = config.description;
} else {
tree.label = 'Tasks for ' + color.highlight(tildify(env.configPath));
}
tree.nodes = gulpInst.tree({ deep: true });
return logTasks(tree, opts, function(taskname) {
if (opts.tasksSimple || opts.tasks || opts.tasksJson) {
// Mute stdout if we are listing tasks
stdout.mute();
}
// This is what actually loads up the gulpfile
var exported = require(env.configPath);
log.info('Using gulpfile', ansi.magenta(tildify(env.configPath)));
var gulpInst = require(env.modulePath);
logEvents(gulpInst);
registerExports(gulpInst, exported);
// Always unmute stdout after gulpfile is required
stdout.unmute();
process.nextTick(function() {
var tree;
if (opts.tasksSimple) {
return logTasksSimple(env, gulpInst);
}
if (opts.tasks) {
tree = taskTree(gulpInst.tasks);
if (config.description && typeof config.description === 'string') {
tree.label = config.description;
} else {
tree.label = 'Tasks for ' + ansi.magenta(tildify(env.configPath));
}
return logTasks(tree, opts, function(task) {
return gulpInst.tasks[task].fn;
function startLogger() {
stdout.mute();
return logger;
}