nipinit
v2.4.0
Published
A command-line utility to easily create new Node.js projects.
Downloads
60
Maintainers
Readme
nipinit
💻 A command-line utility to easily create new Node.js projects.
Table of Content
Installation
You need Node.js v10.17.0 or higher.
Then, simply install nipinit globally like this:
$ npm i -g nipinit
Features
- Initialize an npm project
- Initialize Git, .gitignore and .gitattributes
- Create GitHub's file (Issue/PR templates, changelog, contributing and actions (lint & build))
- Set a license (either MIT, ISC or GPL-v3)
- Possibility to use ES Modules (Node.js' ES Modules, not Babel's)
- Install & configure Babel or TypeScript
- Install & configure ESLint (choose between my configuration (noftalint), airbnb, recommended and standard)
- Install nodemon (+ configure), dotenv (+ initialize), cross-env (+ use in npm scripts) and concurrently
- Create a README, a .editorconfig and a basic file structure (
src/main.{js/ts}
) - Save & use presets
Usage
Requirements
- You need to have Node.js v10.17.0 or newer to use nipinit. You can check your Node.js' version with
node -v
.
Fresh start
To start a new node project with nipinit, go in the parent directory of the location you want in your terminal, and type:
$ nipinit
You will be prompted some questions to generate the boilerplate that fits you the most, and you will be good to go!
Presets
You can create presets when creating a new project (answer 'Yes' to the question Do you want to save this preset?
).
After that, you can generate a new project using this preset just by adding the --preset preset_name
(or -p preset_name
) argument to nipinit.
$ nipinit --preset myCoolPreset
If you create a project without using a preset, but it happens that the exact same configuration is already saved, nipinit will tell you so you can use it next time!
You can also manage your presets with
$ nipinit presets
Other options
There are multiple options (flags) you can add when running nipinit.
--preset
,-p
: see the section about presets--dump-error
,-d
: Show the full error when one occurs.--no-modules
: Create a new project without installing node modules--no-color
: Create a new project without showing colors in the CLI
Screenshots
TO-DO
- [x] Make
--no-modules
add dependencies to the package.json (without installing them) - [x] Add an option to create the project with TypeScript
- [ ] Add unit tests
License
Copyright © 2021 Elliot 'noftaly' Maisl. Licensed under the MIT license, see the license.