-
Notifications
You must be signed in to change notification settings - Fork 0
Build tasks
Edit scripts\templates.build to suit your project. You'll most likely want to change the project name & description, the WebPath & JSFiles properties, remove any unneeded tasks from deploy-prep, and select what files get built in the create-dist, flatten-html & copy-assets tasks.
By default the build assumes you have a project directory structure like the following:
\src\ - where your source files live
\src\images
\src\css
\src\js
\src\foo.php
\dist\ - where the built templates will live
\scripts\ - the build scripts
If not you'll need to change some paths around in templates.build
create-dist Creates the necessary directories for the project (you'll need to set this up based on the example in templates.build)
copy-assets Copies static assets (CSS, JS & images) to the dist directory (you'll need to set this up based on the example in templates.build)
compress-css Minifies .css files in the dist CSS directory using YUI compressor
concatenate-js Concatenates the files in the dist JS directory listed in JSFiles together, in order
compress-js Minifies JS files in the dist JS directory using Closure compiler Also creates a 'js-files' file in the src directory, which contains a <script > tag for the concatenated & minified JS
optimise-images Optimises images in the dist images directory using PNG Crush, JPEG tran & Gifsicle
flatten-html Runs a Nant task on various URLs & saves the flattened HTML to the dist directory (you'll need to set this up based on the example in templates.build) An empty file 'building' will be created in the src directory, you can use the existence of this file to provide different behaviour between test & build
zip-dist-files Creates a zip file of the dist directory
gzip-dist-files Creates a tar.gz file of the dist directory
bzip-dist-files Creates a tar.bz2 file of the dist directory
cleanup-temp-files Removes any temporary files