An open API service indexing awesome lists of open source software.

https://github.com/shiro-saber/node-env-installer

Plugin for Oh my zsh (https://github.com/ohmyzsh/ohmyzsh) that controls the versions of NodeJS projects with NVM.
https://github.com/shiro-saber/node-env-installer

nvm oh-my-zsh oh-my-zsh-plugin

Last synced: about 18 hours ago
JSON representation

Plugin for Oh my zsh (https://github.com/ohmyzsh/ohmyzsh) that controls the versions of NodeJS projects with NVM.

Awesome Lists containing this project

README

          

# Node Env Installer

This plugin lets nvm install new versions and modules for the current project.

Here is a preview of the plugin

![Preview Image](/preview.png)

## Functionality

The plugin is looking for a package.json file to get a NodeJS version and then set it as the current using version.

After getting a node version, if the version is not currently installed in the machine this plugin will install it for you.

You also can configure the implicit installation/update of your package by environment variables, this will use the [npm-install-changed](https://www.npmjs.com/package/npm-install-changed) for the update of the modules.

## Plugin Requirements

For the use of this plugin it's required the installation of:

* [nvm](https://github.com/nvm-sh/nvm)
* [zsh](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH)
* [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh)

## Installation

For the installation you need to

* Clone this project into `~/.oh-my-zsh/custom/plugins`.
* Let your user to execute nvm, usually achieved with `chmod 755 $NVM_DIR/nvm.sh`

## Configuration

After the installation you need to add `node-env-installer` in the `plugins = (...)` variable of your `.zshrc` file.

If you want the plugin to install all dependencies in your projects you can use the next command `echo "export ZSH_NPM_AUTOINSTALL='true'" >> ~/.zshrc`

This last command will set an environment variable that let know the plugin to install and update everytime there is a change in the `package.json` file.