program .command('img:greyscale <path>') .alias('igs') .description('greyscale: remove colour from the image.') .action(path => { makeImgGreyscale(path) })
program .command('template <type>') .usage('<type> --filename [filename] --path [path]') .description('템플릿을 생성합니다.') .alias('tmpl') .option('-f, --filename [filename]', '파일명을 입력하세요.', 'index') .option('-d, --directory [path]', '생성 경로를 입력하세요', '.') .action((type, options) => { makeTemplate(type, options.filename, options.directory); });
program .description(chalk.white('Clay allows you to instantly build and remix cloud hosted functions')) .version('0.5.2') .usage('<command>') .command('new [serviceName]') .description('creates a new service with the name [serviceName].') .action((cmd) => service.create(cmd, account))
program .command('qrcode <path>') .description('Generate a QR code based on the specified string.') .option('-s, --save', 'Save the generated QR code locally.') .option('-w, --width <width>', 'Specify the width of the Qrcode (300).') .action((string, commands) => { generateQrcode(string, commands) })
program .command('ip') .description('Find your local IP address and print it.') .action(() => { console.log(`内网IP: ${getIp()}`) exec(`curl -L tool.lu/ip`, (error, stdout, stderr) => { console.log(stdout) if (error) return print(`error`, `✘ Opps, Something Error: ${error}`) }) })
program .command("preview") .description("Set up your emails directory structure.") .option('-s, --source <path>', 'The source of your templates', 'emails') .action((options) => require("./commands/preview")(options));
program .command('prettier <path>') .alias('p') .description('Prettier the code under the specified path.') .action(param => { const options = getPrettifyOptions() exec(`npx prettier ${options} --write ${getPrettify(param)}`, (error, stdout, stderr) => { console.log(stdout) if (error) return print(`error`, `✘ Opps, Something Error: ${error}`) print(`success`, '✓ Okay, Has successfully prettier your code.') }) })
program .command('rename <path>') .description('Rename batch files (Incremental).') .option('-n, --name <name>', 'New file name specified (String).') .option('-i, --initial <initial>', 'Initial incremental value (Number).') .option('-s, --separator <separator>', 'Separator between name and incremental value (-).') .option('-d, --digits <digits>', 'Specify incremental digits value (3).') .action((string, commands) => { renameBatchFiles(string, commands) })
program .version(pkg.version) .command('generate <mode>') .description('hapi-arch generator command') .action((mode) => generator(mode));
program .version(pkg.version) .command('win') .alias('w') .description('Windows shell commands CLI app') .action(() => { prompt(questions).then(answers => startChildProcess(answers)); });
program .command('img:sepiawash <path>') .alias('isw') .description('Apply a sepia wash to the image.') .action(path => { sepiaWashForImg(path) })
program .command('clear') .alias('c') .description('Clear the terminal screen if possible.') .action(() => { clear() })
program .command('img:shadow <path>') .alias('ishadow') .description('shadow: add shadow for your images.') .action(path => { makeImgAddShadow(path) })
program .command("preview") .description("Set up your emails directory structure.") .option('-s, --source <path>', 'The source of your templates', 'emails') .action((options) => require("./commands/preview")(options));
program .version(pkg.version) .command('win') .alias('w') .description('Windows shell commands CLI app') .action(() => { prompt(questions).then(answers => startChildProcess(answers)); });