@srx32/nopse
v1.0.13
Published
A CLI tool that helps set up NodeJS projects
Downloads
4
Maintainers
Readme
What is it ?
This is a npx command-line tool (Node CLI) that helps me set up my NodeJS projects.
It contains differents templates for different cases (JS, TS, with or without Express).
nopse stands for node project setup
How to use (basic set up / quick start / quick use)
You can use npx, install the npm package or clone the repo and try it locally on your machine.
npx (simplest - no need to install)
- Open your terminal
- Navigate to the folder where you want to set up your Node project
- Run the following command
npx @srx32/nopse create projectName
Install npm package (or npx)
- Open your terminal
- Run the following command
npm install @srx32/nopse -g
It will install the package globally.
- Now, navigate to the diretory where you want to set up your Node project
- Run the following command
nopse create projectName
Try locally
- Clone the repo
- Open it in your code editor
- Use the terminal of your code editor or open the system terminal and navigate to the folder of the project
- Install the required packages by running
npm install
- Then build the project (transpile the TS code to JS) with
npm run build
It will generate a dist folder which will hold the JS version of the code
- And now, run the program with
npx . create projectName
Advanced set up (the different commands and options)
What are the ingredients ?
I have used some libraries to help me build this CLI effectively. These packages are :
commander
It is a package for creating and handling CLI commands, options and more.
chalk
It is a package for logging colored messages in the terminal, with even some styling (bold, italic, etc.).
How are the commands and options structured ?
Some tutorials & references
These are some tutorials and resources that helped me build this CLI :