https://github.com/shadow-light/npmenv
A wrapper for npm that stores node_modules outside of project and provides easy access to them.
https://github.com/shadow-light/npmenv
npm pip pipenv python
Last synced: 5 months ago
JSON representation
A wrapper for npm that stores node_modules outside of project and provides easy access to them.
- Host: GitHub
- URL: https://github.com/shadow-light/npmenv
- Owner: shadow-light
- License: mit
- Archived: true
- Created: 2018-08-29T01:47:29.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T02:55:07.000Z (over 3 years ago)
- Last Synced: 2025-09-28T19:26:11.688Z (9 months ago)
- Topics: npm, pip, pipenv, python
- Language: Python
- Homepage: https://pypi.org/project/npmenv/
- Size: 226 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# npmenv
A wrapper for npm that stores node_modules outside of project and provides easy access to them.
`npmenv` is a Python module inspired by `pipenv` in that it stores packages outside of projects (in an OS-specific dir) to avoid cluttering projects. It also has a `run` command that puts `node_modules/.bin` in `PATH` before running the given command. If you `install node` in a project then it will have the added benefit of using that node version to run your code and third-party scripts. You can then lock down your node version per-project and upgrade them individually when desired.
__Install:__ `pip install npmenv`\
__Supports:__ All platforms (Linux, MacOS, Windows)\
__Requires:__ Python 3.6+
[Documentation](https://pypi.org/project/npmenv/) | [Source](https://github.com/shadow-light/npmenv)
## How it works
Aside from `env-...` commands, npmenv hands over to `npm`. But before handing over, it symlinks your `package.json` and/or `package-lock.json` into the virtual environment and runs npm in that environment. You can access any `node_modules` files via the path returned by `npmenv env-location`, which will stay the same even if the environment is removed and recreated (though not if your project path changes).
__Note:__ npmenv does not handle any other files generated by npm (such as shrinkwrap), though more features may be added in future.