chore: update to index.js

This commit is contained in:
EvolutionX
2022-04-16 11:54:40 +05:30
parent dc0abb23ae
commit 82234f44de
2 changed files with 9 additions and 18 deletions

View File

@@ -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;