Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
};
installPackageWithFlags("hyperapp", "--save");
installPackageWithFlags("hyperapp-scripts", "--save-dev");
console.log();
console.log(`Success! Created ${name} in ${process.cwd()}`);
console.log("Inside that directory, you can run several commands:");
console.log();
console.log(cyan(` npm start`));
console.log(" Starts the development server.");
console.log();
console.log(cyan(` npm run build`));
console.log(" Bundles the app into static files for production.");
console.log();
console.log(cyan(` npm test`));
console.log(" Starts the test runner.");
console.log();
console.log("We suggest that you begin by typing:");
console.log();
console.log(cyan(" cd"), name);
console.log(` ${cyan("npm start")}`);
console.log();
console.log("Happy hacking!");
info: (...args) => log(cyan(args.join(' '))),
warn: (...args) => log(yellow(args.join(' '))),
function printDiagnostic(d: d.Diagnostic) {
const outputLines = wordWrap([d.messageText], getColumns());
let header = '';
if (d.header && d.header !== 'Build Error') {
header += d.header;
}
if (d.relFilePath) {
if (header.length > 0) {
header += ': ';
}
header += color.cyan(d.relFilePath);
if (typeof d.lineNumber === 'number' && d.lineNumber > -1) {
header += color.dim(`:`);
header += color.yellow(`${d.lineNumber}`);
if (typeof d.columnNumber === 'number' && d.columnNumber > -1) {
header += color.dim(`:`);
header += color.yellow(`${d.columnNumber}`);
}
}
}
if (header.length > 0) {
outputLines.unshift(INDENT + header);
}
protected printEnabledPostProcessors(): void {
this.out(cyan('Enabled post processors:'));
if (this.postProcessors.length) {
this.out(cyan(dim(this.postProcessors.map(postProcessor => `- ${postProcessor.constructor.name}`).join('\n'))));
} else {
this.out(cyan(dim('(none)')));
}
this.out();
}
protected printEnabledCompiler(): void {
this.out(cyan('Compiler:'));
this.out(cyan(dim(`- ${this.compiler.constructor.name}`)));
this.out();
}
}
.then(([batchNo, log]) => {
if (log.length === 0) {
success(color.cyan('Already at the base migration'));
}
success(
color.green(
`Batch ${batchNo} rolled back: ${log.length} migrations`
) + (argv.verbose ? `\n${color.cyan(log.join('\n'))}` : '')
);
})
.catch(exit);
.then(([log]) => {
if (log.length === 0) {
success(color.cyan('No seed files exist'));
}
success(
color.green(`Ran ${log.length} seed files`) +
(argv.verbose ? `\n${color.cyan(log.join('\n'))}` : '')
);
})
.catch(exit);