ncc-prototype-email-alerts-sub
Version:
Northumberland Council Front End Email Alerts Subscription Prototype
21 lines (18 loc) • 647 B
text/typescript
import { program } from "commander";
import { setupScaffoldFiles } from './createScaffolds';
program
.version("0.0.1")
.description("NCC Scaffold Page Creator")
.option("-n, --name <type>", "Provide a page and route name")
.option("-t, --type <type>", "Provide a page route HTTP type")
.option("-te, --template <type>", "Provide the base template name")
.option("-v, --validator <type>", "Provide a validator")
.action(async (options) => {
try {
await setupScaffoldFiles(options.name, options.type, options.template);
} catch (e) {
console.error(e);
}
});
program.parse(process.argv);