Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tree = gulpInst.tree({ deep: true });
if (config.description && typeof config.description === 'string') {
tree.label = config.description;
} else {
tree.label = 'Tasks for ' + tildify(env.configPath);
}
var output = JSON.stringify(copyTree(tree, opts));
if (typeof opts.tasksJson === 'boolean' && opts.tasksJson) {
return console.log(output);
}
return fs.writeFileSync(opts.tasksJson, output, 'utf-8');
}
try {
log.info('Using gulpfile', color.highlight(tildify(env.configPath)));
gulpInst.parallel(toRun)(function(err) {
if (err) {
exit(1);
}
});
} catch (err) {
log.error(color.error(err.message));
log.error('To list available tasks, try running: gulp --tasks');
exit(1);
}
});
}
tree = {};
if (config.description && typeof config.description === 'string') {
tree.label = config.description;
} else {
tree.label = 'Tasks for ' + tildify(env.configPath);
}
tree.nodes = gulpInst.tree({ deep: true });
var output = JSON.stringify(copyTree(tree, opts));
if (typeof opts.tasksJson === 'boolean' && opts.tasksJson) {
return console.log(output);
}
return fs.writeFileSync(opts.tasksJson, output, 'utf-8');
}
try {
log.info('Using gulpfile', color.highlight(tildify(env.configPath)));
gulpInst.parallel(toRun)(function(err) {
if (err) {
exit(1);
}
});
} catch (err) {
log.error(color.error(err.message));
log.error('To list available tasks, try running: gulp --tasks');
exit(1);
}
});
}
var displayNextReleaseSteps = function(done) {
logger.info('The project now has a new version and was pushed to master');
logger.info('Next steps:');
logger.info(' 1. Got to github and create a pull request from master to release');
logger.info(' 2. Somebody else should review the PR and merge it');
logger.info(' 3. The CI will publish it and create a release on github');
done();
}
bumpVersion.displayName = 'Display next release steps';
.then(function () {
log.info('Built ' + bundleFileName);
})
.catch(function (err) {
installBehavior (done) {
log.info("Installing behaviour packs");
return this.foreachPack("behavior", (pack, packDone) => {
const destination = path.join(this.gameDataDir, "development_behavior_packs");
log.info(`\t${pack.name}`);
pump(
[
src("./**/*", { cwd: path.join(this.bundleDir, pack.relativePath) }),
tap(file => {
//We want to include the package name in the directory.
file.base = path.resolve(file.base, "..");
}),
...this.getTasks((plugin) => plugin.installBehaviorTasks),
dest(destination)
],
packDone
);
},
through.obj(function(file, enc, callback) {
log.info('Updated asset manifest');
this.push(file);
callback();
})
)
settings.BUILD_OPTIMIZED = true
settings.NODE_ENV = 'production'
process.env.NODE_ENV = 'production'
helpers.showBuildConfig()
const storeTarget = c.bold.red(`${settings.BRAND_TARGET} ${settings.PUBLISH_CHANNEL}`)
const answers = await inquirer.prompt([{
default: false,
message: `Publish ${storeTarget} version ${c.bold.red(settings.PACKAGE.version)} to ${settings.BUILD_TARGET} store?`,
name: 'start',
type: 'confirm',
}])
if (!answers.start) {
logger.info('Publishing aborted')
done(); return
}
gulp.series(
gulp.parallel(test.tasks.lint, test.tasks.unit),
'test-browser',
build,
publish.tasks.package,
function toStore(finished) {
if (settings.BUILD_TARGET === 'chrome') publish.tasks.googleStore(finished)
return finished()
},
publish.tasks.sentryRelease,
)(done)
})
pipe(tap(function (file) {
log.info('bundling ' + file.path);
file.contents = browserify(file.path, {debug: true}).bundle();
})).
pipe(buffer()).
installBehavior(done) {
_internalDebug && log.info("Installing behaviour packs");
return this.foreachPack(
"installBehavior",
"behavior",
(pack, packDone) => {
const packDir = this.parseTemplate(this.templateDirName, pack, "behavior");
const destination = path.join(this.gameDataDir, "development_behavior_packs", packDir);
_internalDebug && log.info(`\t${pack.name}`);
return pump(
[
src("./**/*", {
cwd: path.join(this.bundleDir, pack.relativePath)
}),
...this.getTasks((plugin) => plugin.installBehaviorTasks),
dest(destination)
],
packDone
const notify = function notify (done) {
log.info("File Changed\n");
done();
};