1.0.1 • Published 4 years ago

interactive-cli-tool v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

Interactive CLI Tool

An Interactive CLI Tool with Node.js

Idea

This will be useful for the now-config file. This CLI Tool will help generate a now.sh configuration file.

Usage

now-config

Library

There are so many libraries to use for user interaction. Some of them are:

Example for the library used in this project (Inquirer):

  • https://github.com/SBoudrias/Inquirer.js/blob/master/packages/inquirer/examples/pizza.js

  • Dev Dependencies

    $ npx eslint --init
    
     ✔ How would you like to use ESLint? · style
    ✔ What type of modules does your project use? · commonjs
    ✔ Which framework does your project use? · none
    ✔ Does your project use TypeScript? · No / Yes
    ✔ Where does your code run? · browser
    ✔ How would you like to define a style for your project? · guide
    ✔ Which style guide do you want to follow? · airbnb
    ✔ What format do you want your config file to be in? · JavaScript

NOTES:

  • To test the development of the package/module locally:
    • Add the bin to the package.json:
    {
      "bin": {
        "now-config": "src/index.js"
      }
    }
    • Specifiy the specific interpreter on the top of the main file (inde.js)
      #! /usr/bin/env node
    • $ npm link -> it will install globally for the current directory;
    • $ interactive-cli-tool -> it will run the module in the current directory;
    • To remove the npm link, since $ npm unlink is not working, use: $ npm uninstall -g interactive-clit-tool.