@mongez/gnz
Version:
Generator Z, the next generation of scaffolding tools.
19 lines (18 loc) • 1.32 kB
JavaScript
;var commander=require('commander'),path=require('path'),index=require('../../index.js'),main=require('../../../../main.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var path__default=/*#__PURE__*/_interopDefault(path);const newReactMongezCommand = new commander.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, withoutDetailsPage, addToAppModules, updateUrls, usingPages, } = options;
await main.gnz.execute(index.generateReactMongez.execute({
name,
saveTo: path__default.default.resolve(process.cwd(), path || ""),
withDetailsPage: withoutDetailsPage !== "false",
addToAppModules: addToAppModules !== "false",
updateUrls: updateUrls !== "false",
usingPages: usingPages !== "false",
}));
});exports.newReactMongezCommand=newReactMongezCommand;//# sourceMappingURL=new-react-mongez-module-command.js.map