From 82234f44de440361a8062899489c39be5e71efdb Mon Sep 17 00:00:00 2001 From: EvolutionX Date: Sat, 16 Apr 2022 11:54:40 +0530 Subject: [PATCH] chore: update to index.js --- .github/workflows/linter.yml | 2 +- src/index.js | 25 ++++++++----------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index a184149..e6e6132 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -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}" \ No newline at end of file diff --git a/src/index.js b/src/index.js index 1cb2a5e..c6d0bf4 100644 --- a/src/index.js +++ b/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;