-
Notifications
You must be signed in to change notification settings - Fork 55
install
In order to successfully use this you will need:
- node <= 0.6.7
- npm
You should be able to use it on:
- OSX
- Unix
- Windows
There is two main way to install, using a "global" or a "local" install.
-
When installed globally: Provides a custom global binary named
h5bp
(orhtml5-boilerplate
) which is a wrapper on top of grunt, plus the extra specific task and helpers. -
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 viagrunt
.
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.
Append a -g
flag if you'd like to install globally and have the h5bp binary
installed.
npm install https://github.com/h5bp/node-build-script/tarball/master
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
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.
This works for system where grunt have been already installed globally with npm install grunt -g
.
-
Add the node-build-script as a project dependency. In your projet's root, next to the
grunt.js
andpackage.json
file, runnpm install http://nodeload.github.com/h5bp/node-build-script/tarball/master -S
-
Add
grunt.loadNpmTasks('node-build-script')
into the projetc'sgrunt.js
gruntfile. -
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.0"
}
Change 0.1.0
to the tarball url: http://nodeload.github.com/h5bp/node-build-script/tarball/master
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, insted of
npm install -g
).
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.