mirror of
https://github.com/sern-handler/cli
synced 2026-06-06 01:16:53 +00:00
chore: update to index.js
This commit is contained in:
2
.github/workflows/linter.yml
vendored
2
.github/workflows/linter.yml
vendored
@@ -34,6 +34,6 @@ jobs:
|
||||
eslint: true
|
||||
prettier: true
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
auto_fix: true
|
||||
auto_fix: false
|
||||
eslint_extensions: js
|
||||
commit_message: "style(auto): fix code style issues with ${linter}"
|
||||
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