diff --git a/init/30_osx_homebrew_casks.sh b/init/30_osx_homebrew_casks.sh index 811d811dea..9144afb2bc 100644 --- a/init/30_osx_homebrew_casks.sh +++ b/init/30_osx_homebrew_casks.sh @@ -21,63 +21,62 @@ casks=( # Applications 1password a-better-finder-rename - battle-net - bettertouchtool + # bettertouchtool charles - chromium - chronosync - dropbox - easysimbl - fastscripts - firefox + # chromium + # chronosync + # dropbox + # easysimbl + # fastscripts + # firefox google-chrome - gyazo - hermes - hex-fiend + # gyazo + # hermes + # hex-fiend iterm2 - launchbar - macvim - menumeters + # launchbar + # macvim + # menumeters moom - omnidisksweeper - race-for-the-galaxy - remote-desktop-connection - scroll-reverser - sharemouse + # omnidisksweeper + # race-for-the-galaxy + # remote-desktop-connection + # scroll-reverser + # sharemouse skype slack - sonos - sourcetree + # sonos + # sourcetree spotify - star-realms - steam - synology-assistant - teamspeak-client - teamviewer - the-unarchiver - todoist - totalfinder - tower + # star-realms + # steam + # synology-assistant + # teamspeak-client + # teamviewer + # the-unarchiver + # todoist + # totalfinder + # tower transmission-remote-gui vagrant virtualbox - vlc + # vlc # Drivers - d235j-xbox360-controller-driver + # d235j-xbox360-controller-driver # Quick Look plugins - betterzipql - qlcolorcode - qlmarkdown - qlprettypatch - qlstephen - quicklook-csv - quicklook-json - quicknfo - suspicious-package - webpquicklook + # betterzipql + # qlcolorcode + # qlmarkdown + # qlprettypatch + # qlstephen + # quicklook-csv + # quicklook-json + # quicknfo + # suspicious-package + # webpquicklook # Color pickers - colorpicker-developer - colorpicker-skalacolor + # colorpicker-developer + # colorpicker-skalacolor ) # Install Homebrew casks. diff --git a/init/30_osx_homebrew_recipes.sh b/init/30_osx_homebrew_recipes.sh index 38cbee36c2..dc531a9207 100644 --- a/init/30_osx_homebrew_recipes.sh +++ b/init/30_osx_homebrew_recipes.sh @@ -9,7 +9,7 @@ recipes=( ansible bash cmatrix - cowsay + # cowsay git git-extras htop-osx diff --git a/init/50_node.sh b/init/50_node.sh index aa60d22e93..3967bb00f0 100644 --- a/init/50_node.sh +++ b/init/50_node.sh @@ -2,4 +2,4 @@ source $DOTFILES/source/50_node.sh # Install latest stable Node.js, set as default, install global npm modules. -nave_install stable +nvm install stable diff --git a/source/50_node.sh b/source/50_node.sh index 9c30b1e67b..4852ae57f6 100644 --- a/source/50_node.sh +++ b/source/50_node.sh @@ -1,119 +1,121 @@ -export PATH -PATH=~/.nave/installed/default/bin:"$(path_remove ~/.nave/installed/*/bin)" +export NVM_DIR="/Users/PV/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm +# export PATH +# PATH=~/.nave/installed/default/bin:"$(path_remove ~/.nave/installed/*/bin)" # Set a specific version of node as the "default" for "nave use default" -function nave_default() { - local version - local default=${NAVE_DIR:-$HOME/.nave}/installed/default - [[ ! "$1" ]] && echo "Specify a node version or \"stable\"" && return 1 - [[ "$1" == "stable" ]] && version=$(nave stable) || version=${1#v} - rm "$default" 2>/dev/null - ln -s $version "$default" - echo "Nave default set to $version" -} +# function nave_default() { +# local version +# local default=${NAVE_DIR:-$HOME/.nave}/installed/default +# [[ ! "$1" ]] && echo "Specify a node version or \"stable\"" && return 1 +# [[ "$1" == "stable" ]] && version=$(nave stable) || version=${1#v} +# rm "$default" 2>/dev/null +# ln -s $version "$default" +# echo "Nave default set to $version" +# } # Install a version of node, set as default, install npm modules, etc. -function nave_install() { - local version - [[ ! "$1" ]] && echo "Specify a node version or \"stable\"" && return 1 - [[ "$1" == "stable" ]] && version=$(nave stable) || version=${1#v} - if [[ ! -d "${NAVE_DIR:-$HOME/.nave}/installed/$version" ]]; then - e_header "Installing Node.js $version" - nave install $version - fi - [[ "$1" == "stable" ]] && nave_default stable && npm_install -} +# function nave_install() { +# local version +# [[ ! "$1" ]] && echo "Specify a node version or \"stable\"" && return 1 +# [[ "$1" == "stable" ]] && version=$(nave stable) || version=${1#v} +# if [[ ! -d "${NAVE_DIR:-$HOME/.nave}/installed/$version" ]]; then +# e_header "Installing Node.js $version" +# nave install $version +# fi +# [[ "$1" == "stable" ]] && nave_default stable && npm_install +# } # Global npm modules to install. -npm_globals=( - bower - ember-cli - grunt-cli - grunt-init - linken - node-inspector - yo -) +# npm_globals=( +# bower +# ember-cli +# grunt-cli +# grunt-init +# linken +# node-inspector +# yo +# ) # Update npm and install global modules. -function npm_install() { - local installed modules - e_header "Updating npm" - npm update -g npm - { pushd "$(npm config get prefix)/lib/node_modules"; installed=(*); popd; } >/dev/null - modules=($(setdiff "${npm_globals[*]}" "${installed[*]}")) - if (( ${#modules[@]} > 0 )); then - e_header "Installing Npm modules: ${modules[*]}" - npm install -g "${modules[@]}" - fi -} +# function npm_install() { +# local installed modules +# e_header "Updating npm" +# npm update -g npm +# { pushd "$(npm config get prefix)/lib/node_modules"; installed=(*); popd; } >/dev/null +# modules=($(setdiff "${npm_globals[*]}" "${installed[*]}")) +# if (( ${#modules[@]} > 0 )); then +# e_header "Installing Npm modules: ${modules[*]}" +# npm install -g "${modules[@]}" +# fi +# } # Publish module to Npm registry, but don't update "latest" unless the version # is an actual release version! -function npm_publish() { - local version="$(node -pe 'require("./package.json").version' 2>/dev/null)" - if [[ "${version#v}" =~ [a-z] ]]; then - local branch="$(git branch | perl -ne '/^\* (.*)/ && print $1')" - echo "Publishing dev version $version with --force --tag=$branch" - npm publish --force --tag="$branch" "$@" - else - echo "Publishing new latest version $version" - npm publish "$@" - fi -} +# function npm_publish() { +# local version="$(node -pe 'require("./package.json").version' 2>/dev/null)" +# if [[ "${version#v}" =~ [a-z] ]]; then +# local branch="$(git branch | perl -ne '/^\* (.*)/ && print $1')" +# echo "Publishing dev version $version with --force --tag=$branch" +# npm publish --force --tag="$branch" "$@" +# else +# echo "Publishing new latest version $version" +# npm publish "$@" +# fi +# } # Crazy-ass, cross-repo npm linking. # Inter-link all projects, where each project exists in a subdirectory of # the current parent directory. Uses https://github.com/cowboy/node-linken -alias npm_linkall='eachdir "rm -rf node_modules; npm install"; linken */ --src .' -alias npm_link='rm -rf node_modules; npm install; linken . --src ..' +# alias npm_linkall='eachdir "rm -rf node_modules; npm install"; linken */ --src .' +# alias npm_link='rm -rf node_modules; npm install; linken . --src ..' # Link this project's grunt stuff to the in-development grunt stuff. -alias npm_link_grunt='linken . --src ~/gruntjs' +# alias npm_link_grunt='linken . --src ~/gruntjs' # Print npm owners in subdirectories. -alias npm_owner_list='eachdir "npm owner ls 2>/dev/null | sort"' +# alias npm_owner_list='eachdir "npm owner ls 2>/dev/null | sort"' # Add npm owners to projects in subdirectories. -function npm_owner_add() { - local users= - local root="$(basename $(pwd))" - [[ $root == "gruntjs" ]] && users="cowboy tkellen" - if [[ -n "$users" ]]; then - eachdir "__npm_owner_add_each $users" - fi -} +# function npm_owner_add() { +# local users= +# local root="$(basename $(pwd))" +# [[ $root == "gruntjs" ]] && users="cowboy tkellen" +# if [[ -n "$users" ]]; then +# eachdir "__npm_owner_add_each $users" +# fi +# } -function __npm_owner_add_each() { - local owners - owners="$(npm owner ls 2>/dev/null)" - [[ $? != 0 ]] && return - for user in $*; do - echo $owners | grep -v $user >/dev/null && npm owner add $user - done -} +# function __npm_owner_add_each() { +# local owners +# owners="$(npm owner ls 2>/dev/null)" +# [[ $? != 0 ]] && return +# for user in $*; do +# echo $owners | grep -v $user >/dev/null && npm owner add $user +# done +# } # Look at a project's package.json and figure out what dependencies can be # updated. While the "npm outdated" command only lists versions that are valid # per the version string in package.json, this looks at the @latest tag in npm. -function npm_latest() { - if [[ -e 'node_modules' ]]; then - echo 'Backing up node_modules directory.' - mv "node_modules" "node_modules-$(date "+%Y_%m_%d-%H_%M_%S")" - fi - local deps='JSON.parse(require("fs").readFileSync("package.json")).dependencies' - # Install the latest version of all dependencies listed in package.json. - echo 'Installing @latest version of all dependencies...' - npm install $(node -pe "Object.keys($deps).map(function(m){return m+'@latest'}).join(' ')"); - # List all dependencies that are now invalid, along with their (new) version. - local npm_ls="$(npm ls 2>/dev/null)" - if echo "$npm_ls" | grep invalid >/dev/null; then - echo -e '\nTHESE DEPENDENCIES CAN POSSIBLY BE UPDATED\n' - echo 'Module name: @latest: package.json:' - echo "$npm_ls" | perl -ne "m/.{10}(.+)@(.+?) invalid\$/ && printf \"%-30s %-20s %s\", \$1, \$2, \`node -pe '$deps[\"\$1\"]'\`" - return 99 - else - echo -e '\nAll dependencies are @latest version.' - fi -} +# function npm_latest() { +# if [[ -e 'node_modules' ]]; then +# echo 'Backing up node_modules directory.' +# mv "node_modules" "node_modules-$(date "+%Y_%m_%d-%H_%M_%S")" +# fi +# local deps='JSON.parse(require("fs").readFileSync("package.json")).dependencies' +# # Install the latest version of all dependencies listed in package.json. +# echo 'Installing @latest version of all dependencies...' +# npm install $(node -pe "Object.keys($deps).map(function(m){return m+'@latest'}).join(' ')"); +# # List all dependencies that are now invalid, along with their (new) version. +# local npm_ls="$(npm ls 2>/dev/null)" +# if echo "$npm_ls" | grep invalid >/dev/null; then +# echo -e '\nTHESE DEPENDENCIES CAN POSSIBLY BE UPDATED\n' +# echo 'Module name: @latest: package.json:' +# echo "$npm_ls" | perl -ne "m/.{10}(.+)@(.+?) invalid\$/ && printf \"%-30s %-20s %s\", \$1, \$2, \`node -pe '$deps[\"\$1\"]'\`" +# return 99 +# else +# echo -e '\nAll dependencies are @latest version.' +# fi +# }