HTML and CSS Reference
In-Depth Information
Using the Node build script with an existing project
It is not impossible to use the script with an existing project, but it's just a bit more te-
dious. There is work underway in the project to make this happen at github.com/
h5bp/node-build-script/issues/55 , but until then, the following is how we
can use it with our Sun and Sand website:
1. First, create a temporary folder, and execute the Node build script to ini-
tialize an empty project from the command line as described in the earlier
section.
2. Then, copy only package.json and grunt.js into your project folder.
You can see the code in the nimbu.in/h5bp-book/chapter-7-node-init/
folder to see this in action.
Using the Node build script to build your project
Navigate to the Sun and Sand project folder (that you initialized it in the previous
section) in your command-line tool and enter the following command:
h5bpbuild:default
This will combine the files and the results are published in the publish folder just
like the Ant build script. You can also use these other build options like the Ant build
script.
Text
If you would like to leave out compressing images when building your project, then
use the following command:
h5bpbuild:text
Minify
If you would like to additionally minify HTML files, then use the following command:
Search WWH ::




Custom Search