install

ekryski edited this page Nov 13, 2012 · 9 revisions

Install

Requirements

In order to successfully use this you will need:

  • node 0.6.x
  • npm

You should be able to use it on:

  • OSX
  • Unix
  • Windows

Install instructions

There is two main way to install, using a "global" or a "local" install.

  1. When installed globally: Provides a custom global binary named h5bp (or html5-boilerplate) which is a wrapper on top of grunt, plus the extra specific task and helpers.

  2. When installed locally: ability to load in your project and grunt setup a set of tasks that get referenced in your gruntfile (grunt.js) when run via grunt.

node-build-script is not on npm (yet), but you can install it (and/or add it to your project dependencies) using a tarball url, very much like if it was published on npm.

global install

npm install https://github.com/h5bp/node-build-script/tarball/master -g

This installs the plugin globally, which contains its own internal grunt and provides an h5bp binary.

Proxies don't like redirections, if you get problem with this command, try this instead:

npm install http://nodeload.github.com/h5bp/node-build-script/tarball/master -g

local install

This works for system where grunt have been already installed globally with

npm install grunt -g
  1. Add the node-build-script as a project dependency. In your project's root, next to the grunt.js and package.json file, run npm install http://github.com/h5bp/node-build-script/tarball/master -S

  2. Add grunt.loadNpmTasks('node-build-script') into the project's grunt.js gruntfile.

  3. Run grunt --help and all of the node-build-script's tasks and helpers should be available in addition to those already provided by grunt.

The -S flag (or --save) will make npm add the dependency in the dependencies property of your package.json. This is optional but ensures you never forget to update your package.json file accordingly.

Note: Once on npm, it'll be easier. The npm install -S step will add the following to your package.json file.

"dependencies": {
  "node-build-script": "0.1.1"
}

Change 0.1.1 to the tarball url: http://github.com/h5bp/node-build-script/tarball/master

git clone / npm install

Clone or download this repo. Then, cd into it and run the npm install command.

# will most likely change to map the new location / repo / branch
git clone git://github.com/h5bp/node-build-script.git

# install the dependencies
# locally to play with it from the repo
npm install

# or globally, to install the h5bp binary
npm install -g

For development, the npm link command might be handy (posix only, instead of npm install -g).

Uninstall

You may want to uninstall the globally installed package by running the following command:

npm uninstall node-build-script -g

So sad to see you go ☹

If it was installed locally, next to your gruntfile, simply drop the node_modules/node-build-script folder.