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
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:
- Wait for a single project to install
- Change to the next project
- Run the install on the next project
- 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.
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.
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.
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.jsIn this example we have 5 project folders within a parent folder named
Parent-Directory. Each project gives an example situation that might occur.
- Project-1 contains a
package.jsonon the root level
- Output: npmi.js will run
npm i- Project-2 contains a
package.jsonon the root level, and anotherpackage.jsonwithin > theclient/andserver/folders respectively
- Output: npmi.js will run
npm ion all 3 folders- Project-3 does not contain a
package.jsonon the root level, but does within the/Solvedand/Unsolvedfolders
- Output: npmi.js will run
npm ion the/Solvedand/Unsolvedfolders- Project-4 does not contain a
package.jsonon the root level, no package on the/subFolderlevel, and a package on the/subfolder2level
- Output: npmi.js will do nothing. npmi.js only looks for a
package.json1 folder deep into each project.- Project-5 does not contain a
package.jsonat all
- Output: npmi.js will do nothing
Distributed under the MIT License. See LICENSE for more information.
Mateo Wallace - GitHub - Email - LinkedIn - Portfolio - npmi.js repo
