Skip to content

Mateo-Wallace/npmi.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm Downloads Shield Stars Shield Forks Shield Contributors Shield License Shield LinkedIn Shield


npmi js logo

npmi.js

A multi-folder npm installer
Globally install npmi.js and run npmijs to install all folders that have a package.json in the cwd

View GitHub · View npm · Report Bug

npm install -g npmi.js
Table of Contents
  1. About The Project
  2. Installation
  3. Usage
  4. License
  5. Contact

About The Project


npmi js working in terminal

npmi.js is an npm package that allows a user to run the command npm install on multiple folders at the same time. The main advantage of this is that if you have multiple projects that take very long to run npm i on, you don't have to sit and wait for:

  1. Wait for a single project to install
  2. Change to the next project
  3. Run the install on the next project
  4. Repeat for all projects

Using npmi.js you simply move all projects into one parent folder, run the command npmijs from the terminal, and let your computer do its thing. Essentially cutting out the time waiting for one install to finish in order to manually start the next install.

Installation

npmi.js is meant to be globally installed to your device. To globally install run this command:

npm install -g npmi.js

If you would like to verify the download run npm list -g and you should see npmi.js@1.x.x pop up.

Usage

Once you have npmi.js installed globally, collect all the files you would like to run npm install on into a parent folder. Navigate to the parent folder in your terminal and use the command:

npmijs

Running the command npmijs will check all folders and subfolders to see if they contain a package.json. If the folder does, it will run npm i in that location. It will then repeat this process for all files provided.

Once the process is completed if you would like to verify everything has installed, check your files to see if they have /node_modules and a package_lock.json.

Example Usage

Parent-Directory/
├── Project-1/
│   ├── index.js
│   └── package.json
├── Project-2/
│   ├── client/
│   │   ├── client.js
│   │   └── package.json
│   ├── server/
│   │   ├── server.js
│   │   └── package.json
│   └── package.json
├── Project-3/
│   ├── Solved/
│   │   ├── index.js
│   │   └── package.json
│   └── Unsolved/
│       ├── index.js
│       └── package.json
├── Project-4/
│   └── subfolder/
│       └── subfolder2/
│           ├── index.js
│           └── package.json
└── Project-5/
    └── index.js

In this example we have 5 project folders within a parent folder named Parent-Directory. Each project gives an example situation that might occur.

  1. Project-1 contains a package.json on the root level
    • Output: npmi.js will run npm i
  2. Project-2 contains a package.json on the root level, and another package.json within > the client/ and server/ folders respectively
    • Output: npmi.js will run npm i on all 3 folders
  3. Project-3 does not contain a package.json on the root level, but does within the /Solved and /Unsolved folders
    • Output: npmi.js will run npm i on the /Solved and /Unsolved folders
  4. Project-4 does not contain a package.json on the root level, no package on the /subFolder level, and a package on the /subfolder2 level
    • Output: npmi.js will do nothing. npmi.js only looks for a package.json 1 folder deep into each project.
  5. Project-5 does not contain a package.json at all
    • Output: npmi.js will do nothing

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Mateo Wallace - GitHub - Email - LinkedIn - Portfolio - npmi.js repo

About

npm package that allows a user to run npm install on multiple folders concurrently using the command line.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published