Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.
For the best experience please use the latest Chrome, Safari or Firefox browser.
{
"author": "Mickael Daniel",
"github": "http://github.com/mklabs",
"twitter": "@mklabs",
"date": "new Date('Mon Apr 10 2012 19:00:00 GMT+0200')"
"dependencies": {
"your-attention": "1.0.0"
}
}
Now a Grunt Plugin (plugins were introduced in grunt 0.3.x)
Still very early stage of development
1. Install the plugin
# next to your project's gruntfile
$ npm install http://nodeload.github.com/h5bp/node-build-script/tarball/master
2. Add the plugin as a project dependency in your package.json
"dependencies": {
"node-build-script": "http://nodeload.github.com/h5bp/node-build-script/tarball/master"
}
Load the plugin tasks - In your gruntfile:
...
// Load the plugin tasks and helpers
grunt.loadNpmTasks('node-build-script')
// Default task.
grunt.registerTask('default', 'lint qunit concat min');
...
$ grunt --help
In addition to those tasks, there are a few additional tasks to help you in the process:
*.html
response.connect watch:reload.Gives you a great development environment
Automatically reloads your browser whenever a file changes
Might re-trigger a given task before reloading
process and build script needs to be almost immediate in this context
and node is a pretty good candidate for that :p
The idea grown and original came from @necolas proposal.
DOM-based build script can tremendously reduce the amount of configuration.
If not simply removing the need of confirmation.
How it works
https://github.com/h5bp/node-build-script/wiki/dom
A plugin is a special jQuery "plugin" that can use the node (or grunt) api to do their task.
The following plugins are implemented
var h5bp = require("node-build-script");
module.exports = function(grunt) {
grunt.initConfig({
...,
dom: {
files: ["*.html", "views/**/*.html"],
"script[data-build]" : h5bp.plugins.script,
"link" : h5bp.plugins.link,
"img" : h5bp.plugins.img,
"script, link, img" : h5bp.plugins.rev
},
...
});
};
Windows support for dom based build
Sourcemap generation
Better and more h5bp init templates.
Further integration in init templates of well-known project like twitter/bootstrap or zurb/foundation.
See the gist
$ curl https://raw.github.com/gist/c20d4310c005e31a5cfe/install.sh | sh