@srx32/nopse

1.0.13 • Public • Published

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)

  1. Open your terminal
  2. Navigate to the folder where you want to set up your Node project
  3. Run the following command
npx @srx32/nopse create projectName

Install npm package (or npx)

  1. Open your terminal
  2. Run the following command
npm install @srx32/nopse -g

It will install the package globally.

  1. Now, navigate to the diretory where you want to set up your Node project
  2. Run the following command
nopse create projectName

Try locally

  1. Clone the repo
  2. Open it in your code editor
  3. Use the terminal of your code editor or open the system terminal and navigate to the folder of the project
  4. Install the required packages by running
npm install
  1. 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

  1. 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 :

Tutorial 1 (JS, commander, chalk, etc.)

Tutorial 2 (TS, commander, chalk, figlet, etc.)

Package Sidebar

Install

npm i @srx32/nopse

Weekly Downloads

0

Version

1.0.13

License

ISC

Unpacked Size

46 kB

Total Files

18

Last publish

Collaborators

  • srx32