mirror of
https://github.com/sern-handler/cli
synced 2026-06-26 01:32:23 +00:00
chore: update to index.js
This commit is contained in:
25
src/index.js
25
src/index.js
@@ -1,19 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
const yargs = require('yargs');
|
||||
|
||||
yargs.scriptName('sern');
|
||||
yargs.command({
|
||||
command: 'init',
|
||||
describe: 'Initialize a new project',
|
||||
builder: {
|
||||
name: {
|
||||
describe: 'Project name',
|
||||
demandOption: true,
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
handler: function (argv) {
|
||||
console.log('Initializing a new project...');
|
||||
console.log('Project name: ' + argv.name);
|
||||
},
|
||||
}).argv;
|
||||
const usage = '\nUsage: sern init';
|
||||
yargs
|
||||
.usage(usage)
|
||||
.option('i', {
|
||||
describe: 'Set up basic project without any customizations',
|
||||
boolean: true,
|
||||
})
|
||||
.help(true).argv;
|
||||
|
||||
Reference in New Issue
Block a user