Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.
roblarsen edited this page Feb 4, 2013 · 4 revisions

needs updating

  • The build script makes some assumptions about how your javascript files are sorted.
    • /js/vendor/ contains files from third parties. If these are included in the concat comments, these are minified and concatenated with others. Otherwise they are just minified. Modernizr should be alone in the head. jQuery will be pulled off the CDN by default, but if you include the local copy within the concat comments then it will be concatenated and minified along with the rest of your scripts.
  • When the build script changes your HTML to reference the new minified script (with an neat 7-character SHA-1 hash) it looks for some HTML comments which refer to the beginning and end of the script block. For legacy versions these looked like <!-- scripts concatenated and minified via build script --> <!-- end scripts --> and for 1.0 and greater they look like this. <!-- //-beg- concat_js --><!-- //-end- concat_js --> Starting with HTML5 Boilerplate 4.0 these must be added to your files.
  • It likes your filename extensions to be lowercase. Some things might be skipped if you use a .JPG extension, for example.
  • Although not officially supported, it is possible to set the publish directory to a relative path outside the project folder. This is useful for generating a snapshot onto a staging server, for instance. In order to do so, set the publish directory to a path relative to the project: dir.publish = ../mysite/. Then tell the htmlcompressor script to put the files back where it found them, instead of defining a specific directory. In build.xml, this line <mapper type="glob" from="*" to="../${dir.publish}/*"/> becomes this line <mapper type="glob" from="*" to="*"/>.
  • Intermediate stages are stored in an intermediate folder, and only files that should be published are copied into the publish folder.
  • Files are not deleted at the beginning of every build, and files that have already been processed will not be reprocessed unless the source has changed.
  • Versioned files are referenced by a SHA-1 hash of the content rather than a build number. This means that changing your HTML and rebuilding will not cause your users to redownload the same CSS and Javascript, and a reverted change may cause users to use a copy that was previously downloaded. It may be better to use only part of the hash so the HTTP request is shorter.