Skip to content

Commit

Permalink
Make a few node-related tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboy committed Jun 9, 2016
1 parent b4a3e42 commit 8e46df9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion source/50_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ function nave_install() {

# Global npm modules to install.
npm_globals=(
babel-cli
bower
ember-cli
grunt-cli
grunt-init
linken
node-inspector
pushstate-server
yo
)

Expand Down Expand Up @@ -117,3 +118,13 @@ function npm_latest() {
echo -e '\nAll dependencies are @latest version.'
fi
}

# Force npm to rewrite package.json to sort everything in the default order
function npm-package() {
if [[ "$(cat package.json | grep dependencies)" ]]; then
npm install foo --save && npm uninstall foo --save
fi
if [[ "$(cat package.json | grep devDependencies)" ]]; then
npm install foo --save-dev && npm uninstall foo --save-dev
fi
}

0 comments on commit 8e46df9

Please sign in to comment.