@mongez/gnz
Version:
Generator Z, the next generation of scaffolding tools.
19 lines (18 loc) • 1.15 kB
JavaScript
import {Command}from'commander';import path from'path';import {generateReactMongez}from'../../index.js';import {gnz}from'../../../../main.js';const newReactMongezCommand = new Command("react:mongez")
.arguments("<name>")
.option("-p, --path <path>", "Path to save the module to")
.option("-wdp, --without-details-page", "Generate without details page")
.option("-au, --add-to-app-modules", "Add the module to app-modules.json")
.option("-ur, --update-urls", "Update urls.ts file")
.option("-up, --using-pages", "Separate components directory from pages directory")
.action(async (name, options) => {
const { path: path$1, withoutDetailsPage, addToAppModules, updateUrls, usingPages, } = options;
await gnz.execute(generateReactMongez.execute({
name,
saveTo: path.resolve(process.cwd(), path$1 || ""),
withDetailsPage: withoutDetailsPage !== "false",
addToAppModules: addToAppModules !== "false",
updateUrls: updateUrls !== "false",
usingPages: usingPages !== "false",
}));
});export{newReactMongezCommand};//# sourceMappingURL=new-react-mongez-module-command.js.map