Giter Club home page Giter Club logo

nodenv-default-packages's Introduction

nodenv-default-packages

Latest GitHub Release Latest npm Release Test

This nodenv plugin hooks into the nodenv install command to automatically install npm packages every time you install a new version of Node. It requires the node-build plugin to be installed.

Forked from the excellent rbenv-default-gems plugin from sstephenson.

Installation

Installing as a nodenv plugin

Make sure you have the latest nodenv and node-build versions, then run:

git clone https://github.com/nodenv/nodenv-default-packages.git $(nodenv root)/plugins/nodenv-default-packages

Installing with Homebrew (for OS X users)

Mac OS X users can install nodenv-default-packages with the Homebrew package manager.

This is the recommended method of installation if you installed nodenv with Homebrew.

$ brew install nodenv/nodenv/nodenv-default-packages

Or, if you would like to install the latest development release:

$ brew install --HEAD nodenv/nodenv/nodenv-default-packages

Usage

nodenv-default-packages automatically installs the packages listed in the default-packages file(s) file every time you successfully install a new version of Node with nodenv install.

Specify packages in default-packages by name, one per line. You may optionally specify a semver version spec after the name. For example:

grunt-cli
jshint ~2.6.3
csslint >= 0.9.0 < 0.10.0

Blank lines and lines beginning with a # are ignored.

default-packages Files

nodenv-default-packages reads from $(nodenv root)/default-packages as well as nodenv/default-packages under all XDG config directories. The XDG config directories searched are $XDG_CONFIG_HOME ($HOME/.config if unset/empty) and all colon-separated $XDG_CONFIG_DIRS (/etc/xdg if unset/empty).

Updating Default Packages

if you update your $(nodenv root)/default-packages and want to refresh some or all of your existing node installations you can use commands like this:

nodenv default-packages install 8.8.1   # Reinstall default packages on Node version 8.8.1

nodenv default-packages install --all   # Reinstall default packages on _all_ installed Node versions

NOTE: This may take some time.

Credits

Forked from Sam Stephenson's rbenv-default-gems by Josh Hagins and modified for nodenv.

nodenv-default-packages's People

Contributors

deiga avatar depfu[bot] avatar jasonkarns avatar jawshooah avatar jbcpollak avatar mislav avatar sstephenson avatar toc-me[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nodenv-default-packages's Issues

Support XDG_CONFIG_HOME

At the moment, if my ~/.nodenv is a git-checkout, it becomes a bit more difficult than it really should be to include default-packages in my (separate) dotfiles repo.

Ideally, I'd love it if nodenv-default-packages could look in $XDG_CONFIG_HOME/nodenv/default-packages if $NODENV_ROOT/default-packages is missing.

Thanks!

Usage is missing

$ nodenv default-packages
Usage:
$ nodenv help default-packages 
Usage:

Install default packages on a specific version or all installed versions.

  nodenv default-packages list
  nodenv default-packages install [ --all | <version>...]
  nodenv default-packages files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.