UNPKG

@mongez/gnz

Version:

Generator Z, the next generation of scaffolding tools.

21 lines (20 loc) 1.47 kB
'use strict';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 newQwikComponentCommand = new commander.Command("qwik:component") .arguments("<name>") .option("-p, --path <path>", "Path to save the component to") .option("-i, --index <withIndex>", "Whether to generate an index file or not") .option("-s, --signal <withSignal>", "Whether to generate a signal or not") .option("-t, --task <withTask>", "Whether to generate a task or not") .option("-v, --visible-task <withVisibleTask>", "Whether to generate a visible task or not") .option("-p, --props <withProps>", "Whether to generate props or not") .action(async (name, options) => { const { index: index$1, props, signal, task, visibleTask, path } = options; await main.gnz.execute(index.generateQwikComponent.execute({ name, saveTo: path__default.default.resolve(process.cwd(), path || ""), withIndex: index$1 !== "false", withSignal: signal && signal !== "false", withTask: task && task !== "false", withVisibleTask: visibleTask && visibleTask !== "false", withProps: props && props !== "false", })); });exports.newQwikComponentCommand=newQwikComponentCommand;//# sourceMappingURL=newQwikComponentCommand.js.map