-
-
Save nordringrayhide/c088f8f35c71a1c6b85c2e431f04ac6b to your computer and use it in GitHub Desktop.
Revisions
-
gudleik revised this gist
Jan 4, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,4 +18,6 @@ use_node() { else echo "!!! Node.js version $node_version is not installed" fi export NODE_PATH=./node_modules } -
gudleik revised this gist
Nov 9, 2015 . 2 changed files with 15 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ # Either use node version specified in package.json use node package.json # Or a specific version use node 5.0.0 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,22 +1,21 @@ use_node() { layout node local node_version=$1 if [ "$node_version" == "package.json" ]; then # Requires jq: `brew install jq` node_version=`jq --raw-output .engines.node package.json | tr -d "<=> "` fi local node_path=${NODE_DIR:-/usr/local/n/versions/node} if [ -x "$node_path/$node_version/bin/node" ]; then PATH_add $node_path/$node_version/bin elif [ -x "$node_path/v$node_version/bin/node" ]; then # Support nvm users (nvm prefixes versions with 'v') PATH_add $node_path/v$node_version/bin else echo "!!! Node.js version $node_version is not installed" fi } -
gudleik revised this gist
Nov 3, 2015 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,12 @@ use_node() { layout node NODE_VERSION=$1 NODE_INSTALLATION=${NODE_DIR:-/usr/local/n/versions/node} if [ -x "$NODE_INSTALLATION/$NODE_VERSION/bin/node" ]; then PATH_add $NODE_INSTALLATION/$NODE_VERSION/bin elif [ -x "$NODE_INSTALLATION/v$NODE_VERSION/bin/node" ]; then PATH_add $NODE_INSTALLATION/v$NODE_VERSION/bin else echo "!!! Node.js version $NODE_VERSION is not installed" fi -
gudleik revised this gist
Nov 3, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,10 @@ use_node() { layout node NODE_VERSION=$1 NODE_DIR=${NODE_DIR:-~/.nvm/versions/node}/v$NODE_VERSION if [[ -x "$NODE_DIR/bin/node" ]]; then PATH_add $NODE_DIR/bin else echo "!!! Node.js version $NODE_VERSION is not installed" fi -
gudleik revised this gist
Nov 3, 2015 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,3 @@ use_node() { layout node -
gudleik created this gist
Nov 3, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ # Either use node version specified in package.json use node_from_package_json # Or a specific version use node 5.0.0 # Rest of direnv setup.. export FOO=BAR This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ # Path: ~/.config/direnv/direnvrc use_node() { layout node NODE_VERSION=$1 NODE_PATH=${NVM_DIR:-~/.nvm/versions/node}/v$NODE_VERSION if [[ -x "$NODE_PATH/bin/node" ]]; then PATH_add $NODE_PATH/bin else echo "!!! Node.js version $NODE_VERSION is not installed" fi } # Requires jq: `brew install jq` use_node_from_package_json() { if [[ -f $PWD/package.json ]]; then NODE_VERSION=`jq --raw-output .engines.node package.json | tr -d "<=> "` use node $NODE_VERSION fi }