Skip to content

Instantly share code, notes, and snippets.

@helielson
Created July 18, 2013 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helielson/6030634 to your computer and use it in GitHub Desktop.
Save helielson/6030634 to your computer and use it in GitHub Desktop.
# Note: You may need to use sudo (for OSX, *nix, BSD etc) or run your command shell as Administrator (for Windows) to run some shortcuts.
# ------------------------------------------------------------------------------
#
# NPM
#
# ------------------------------------------------------------------------------
# Install Bower
function nb() {
npm install -g bower
}
# Install GruntJS
function ng() {
npm install -g grunt-cli
}
# Usage:
# -----------
# nb
# ng
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
#
# BOWER
#
# ------------------------------------------------------------------------------
# Search bower packages
function bs() {
bower search "$@"
}
# Install bower package
function bi() {
bower install "$@"
}
# Uninstall bower package
function bu() {
bower uninstall "$@"
}
# Create a JSON file to defining a package
function bjs() {
bower init
}
# Usage:
# -----------
# bs [package]
# bi [package]
# bu [package]
# bjs
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
#
# GRUNTJS
#
# ------------------------------------------------------------------------------
# Install a grunt plugin and save to devDependencies
function gi() {
npm install --save-dev grunt-"$@"
}
# Install a grunt-contrib plugin and save to devDependencies
function gci() {
npm install --save-dev grunt-contrib-"$@"
}
# Usage:
# -----------
# gi [plugin]
# gci [contrib plugin]
# ------------------------------------------------------------------------------
# Note: You may need to use sudo (for OSX, *nix, BSD etc) or run your command shell as Administrator (for Windows) to run some shortcuts.
# ------------------------------------------------------------------------------
#
# NPM
#
# ------------------------------------------------------------------------------
# Install Bower
function nb() {
npm install -g bower
}
# Install GruntJS
function ng() {
npm install -g grunt-cli
}
# Usage:
# -----------
# nb
# ng
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
#
# BOWER
#
# ------------------------------------------------------------------------------
# Search bower packages
function bs() {
bower search "$@"
}
# Install bower package
function bi() {
bower install "$@"
}
# Uninstall bower package
function bu() {
bower uninstall "$@"
}
# Create a JSON file to defining a package
function bjs() {
bower init
}
# Usage:
# -----------
# bs [package]
# bi [package]
# bu [package]
# bjs
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
#
# GRUNTJS
#
# ------------------------------------------------------------------------------
# Install a grunt plugin and save to devDependencies
function gi() {
npm install --save-dev grunt-"$@"
}
# Install a grunt-contrib plugin and save to devDependencies
function gci() {
npm install --save-dev grunt-contrib-"$@"
}
# Usage:
# -----------
# gi [plugin]
# gci [contrib plugin]
# ------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment