Commits

Konstantine Rybnikov committed 3bfcb15

add boilerplate (with small modifications)

  • Participants
  • Parent commits 169ac39

Comments (0)

Files changed (40)

File design/.gitignore

+# Numerous always-ignore extensions
+*.diff
+*.err
+*.orig
+*.log
+*.rej
+*.swo
+*.swp
+*.vi
+*~
+*.sass-cache
+
+# OS or Editor folders
+.DS_Store
+.cache
+.project
+.settings
+.tmproj
+nbproject
+Thumbs.db
+
+# Dreamweaver added files
+_notes
+dwsync.xml
+
+# Komodo
+*.komodoproject
+.komodotools
+
+# Folders to ignore
+.hg
+.svn
+.CVS
+intermediate
+publish
+.idea
+
+# build script local files
+build/buildinfo.properties
+build/config/buildinfo.properties

File design/.htaccess

+# Apache configuration file
+# httpd.apache.org/docs/2.2/mod/quickreference.html
+
+# Note .htaccess files are an overhead, this logic should be in your Apache config if possible
+# httpd.apache.org/docs/2.2/howto/htaccess.html
+
+# Techniques in here adapted from all over, including:
+#   Kroc Camen: camendesign.com/.htaccess
+#   perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
+#   Sample .htaccess file of CMS MODx: modxcms.com
+
+
+###
+### If you run a webserver other than apache, consider:
+### github.com/paulirish/html5-boilerplate-server-configs
+###
+
+
+
+# ----------------------------------------------------------------------
+# Better website experience for IE users
+# ----------------------------------------------------------------------
+
+# Force the latest IE version, in various cases when it may fall back to IE7 mode
+#  github.com/rails/rails/commit/123eb25#commitcomment-118920
+# Use ChromeFrame if it's installed for a better experience for the poor IE folk
+
+<IfModule mod_headers.c>
+    Header set X-UA-Compatible "IE=Edge,chrome=1"
+    # mod_headers can't match by content-type, but we don't want to send this header on *everything*...
+    <FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|xpi|safariextz|vcf)$" >
+      Header unset X-UA-Compatible
+    </FilesMatch>
+</IfModule>
+
+
+# ----------------------------------------------------------------------
+# Cross-domain AJAX requests
+# ----------------------------------------------------------------------
+
+# Serve cross-domain ajax requests, disabled.   
+# enable-cors.org
+# code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
+
+#  <IfModule mod_headers.c>
+#    Header set Access-Control-Allow-Origin "*"
+#  </IfModule>
+
+
+
+# ----------------------------------------------------------------------
+# Webfont access
+# ----------------------------------------------------------------------
+
+# Allow access from all domains for webfonts.
+# Alternatively you could only whitelist your
+# subdomains like "subdomain.example.com".
+
+<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
+  <IfModule mod_headers.c>
+    Header set Access-Control-Allow-Origin "*"
+  </IfModule>
+</FilesMatch>
+
+
+
+# ----------------------------------------------------------------------
+# Proper MIME type for all files
+# ----------------------------------------------------------------------
+
+
+# JavaScript
+#   Normalize to standard type (it's sniffed in IE anyways) 
+#   tools.ietf.org/html/rfc4329#section-7.2
+AddType application/javascript         js
+
+# Audio
+AddType audio/ogg                      oga ogg
+AddType audio/mp4                      m4a
+
+# Video
+AddType video/ogg                      ogv
+AddType video/mp4                      mp4 m4v
+AddType video/webm                     webm
+
+# SVG.
+#   Required for svg webfonts on iPad
+#   twitter.com/FontSquirrel/status/14855840545
+AddType     image/svg+xml              svg svgz 
+AddEncoding gzip                       svgz
+                                       
+# Webfonts                             
+AddType application/vnd.ms-fontobject  eot
+AddType application/x-font-ttf    ttf ttc
+AddType font/opentype                  otf
+AddType application/x-font-woff        woff
+
+# Assorted types                                      
+AddType image/x-icon                   ico
+AddType image/webp                     webp
+AddType text/cache-manifest            appcache manifest
+AddType text/x-component               htc
+AddType application/x-chrome-extension crx
+AddType application/x-xpinstall        xpi
+AddType application/octet-stream       safariextz
+AddType text/x-vcard                   vcf
+
+
+
+# ----------------------------------------------------------------------
+# Allow concatenation from within specific js and css files 
+# ----------------------------------------------------------------------
+
+# e.g. Inside of script.combined.js you could have
+#   <!--#include file="libs/jquery-1.5.0.min.js" -->
+#   <!--#include file="plugins/jquery.idletimer.js" -->
+# and they would be included into this single file.
+
+# This is not in use in the boilerplate as it stands. You may
+# choose to name your files in this way for this advantage or
+# concatenate and minify them manually.
+# Disabled by default.
+
+#<FilesMatch "\.combined\.js$">
+#  Options +Includes
+#  AddOutputFilterByType INCLUDES application/javascript application/json
+#  SetOutputFilter INCLUDES
+#</FilesMatch>
+#<FilesMatch "\.combined\.css$">
+#  Options +Includes
+#  AddOutputFilterByType INCLUDES text/css
+#  SetOutputFilter INCLUDES
+#</FilesMatch>
+
+
+# ----------------------------------------------------------------------
+# Gzip compression
+# ----------------------------------------------------------------------
+
+<IfModule mod_deflate.c>
+
+# Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
+<IfModule mod_setenvif.c>
+  <IfModule mod_headers.c>
+    SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
+    RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
+  </IfModule>
+</IfModule>
+
+# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
+<IfModule filter_module>
+  FilterDeclare   COMPRESS
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/html
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/css
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/plain
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/xml
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/x-component
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/javascript
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/json
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xml
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xhtml+xml
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/rss+xml
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/atom+xml
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/vnd.ms-fontobject
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/svg+xml
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/x-font-ttf
+  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $font/opentype
+  FilterChain     COMPRESS
+  FilterProtocol  COMPRESS  DEFLATE change=yes;byteranges=no
+</IfModule>
+
+<IfModule !mod_filter.c>
+  # Legacy versions of Apache
+  AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
+  AddOutputFilterByType DEFLATE application/javascript
+  AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
+  AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
+  AddOutputFilterByType DEFLATE image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
+</IfModule>
+</IfModule>
+
+
+
+# ----------------------------------------------------------------------
+# Expires headers (for better cache control)
+# ----------------------------------------------------------------------
+
+# These are pretty far-future expires headers.
+# They assume you control versioning with cachebusting query params like
+#   <script src="application.js?20100608">
+# Additionally, consider that outdated proxies may miscache 
+#   www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
+
+# If you don't use filenames to version, lower the CSS  and JS to something like
+#   "access plus 1 week" or so.
+
+<IfModule mod_expires.c>
+  ExpiresActive on
+
+# Perhaps better to whitelist expires rules? Perhaps.
+  ExpiresDefault                          "access plus 1 month"
+
+# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
+  ExpiresByType text/cache-manifest       "access plus 0 seconds"
+
+# Your document html 
+  ExpiresByType text/html                 "access plus 0 seconds"
+  
+# Data
+  ExpiresByType text/xml                  "access plus 0 seconds"
+  ExpiresByType application/xml           "access plus 0 seconds"
+  ExpiresByType application/json          "access plus 0 seconds"
+
+# Feed
+  ExpiresByType application/rss+xml       "access plus 1 hour"
+  ExpiresByType application/atom+xml      "access plus 1 hour"
+
+# Favicon (cannot be renamed)
+  ExpiresByType image/x-icon              "access plus 1 week" 
+
+# Media: images, video, audio
+  ExpiresByType image/gif                 "access plus 1 month"
+  ExpiresByType image/png                 "access plus 1 month"
+  ExpiresByType image/jpg                 "access plus 1 month"
+  ExpiresByType image/jpeg                "access plus 1 month"
+  ExpiresByType video/ogg                 "access plus 1 month"
+  ExpiresByType audio/ogg                 "access plus 1 month"
+  ExpiresByType video/mp4                 "access plus 1 month"
+  ExpiresByType video/webm                "access plus 1 month"
+  
+# HTC files  (css3pie)
+  ExpiresByType text/x-component          "access plus 1 month"
+  
+# Webfonts
+  ExpiresByType font/truetype             "access plus 1 month"
+  ExpiresByType font/opentype             "access plus 1 month"
+  ExpiresByType application/x-font-woff   "access plus 1 month"
+  ExpiresByType image/svg+xml             "access plus 1 month"
+  ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
+    
+# CSS and JavaScript
+  ExpiresByType text/css                  "access plus 1 year"
+  ExpiresByType application/javascript    "access plus 1 year"
+  
+  <IfModule mod_headers.c>
+    Header append Cache-Control "public"
+  </IfModule>
+  
+</IfModule>
+
+
+
+# ----------------------------------------------------------------------
+# ETag removal
+# ----------------------------------------------------------------------
+
+# FileETag None is not enough for every server.
+<IfModule mod_headers.c>
+  Header unset ETag
+</IfModule>
+
+# Since we're sending far-future expires, we don't need ETags for
+# static content.
+#   developer.yahoo.com/performance/rules.html#etags
+FileETag None
+
+
+
+# ----------------------------------------------------------------------
+# Stop screen flicker in IE on CSS rollovers
+# ----------------------------------------------------------------------
+
+# The following directives stop screen flicker in IE on CSS rollovers - in
+# combination with the "ExpiresByType" rules for images (see above). If
+# needed, un-comment the following rules.
+
+# BrowserMatch "MSIE" brokenvary=1
+# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
+# BrowserMatch "Opera" !brokenvary
+# SetEnvIf brokenvary 1 force-no-vary
+
+
+
+# ----------------------------------------------------------------------
+# Cookie setting from iframes
+# ----------------------------------------------------------------------
+
+# Allow cookies to be set from iframes (for IE only)
+# If needed, uncomment and specify a path or regex in the Location directive
+
+# <IfModule mod_headers.c>
+#   <Location />
+#     Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
+#   </Location>
+# </IfModule>
+
+
+
+# ----------------------------------------------------------------------
+# Start rewrite engine
+# ----------------------------------------------------------------------
+
+# Turning on the rewrite engine is necessary for the following rules and features.
+# FollowSymLinks must be enabled for this to work.
+
+<IfModule mod_rewrite.c>
+  Options +FollowSymlinks
+  RewriteEngine On
+</IfModule>
+
+
+
+# ----------------------------------------------------------------------
+# Suppress or force the "www." at the beginning of URLs
+# ----------------------------------------------------------------------
+
+# The same content should never be available under two different URLs - especially not with and
+# without "www." at the beginning, since this can cause SEO problems (duplicate content).
+# That's why you should choose one of the alternatives and redirect the other one.
+
+# By default option 1 (no "www.") is activated. Remember: Shorter URLs are sexier.
+# no-www.org/faq.php?q=class_b
+
+# If you rather want to use option 2, just comment out all option 1 lines
+# and uncomment option 2.
+# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
+
+# ----------------------------------------------------------------------
+
+# Option 1:
+# Rewrite "www.example.com -> example.com" 
+
+<IfModule mod_rewrite.c>
+  RewriteCond %{HTTPS} !=on
+  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
+  RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
+</IfModule>
+
+# ----------------------------------------------------------------------
+
+# Option 2:
+# To rewrite "example.com -> www.example.com" uncomment the following lines.
+# Be aware that the following rule might not be a good idea if you
+# use "real" subdomains for certain parts of your website.
+
+# <IfModule mod_rewrite.c>
+#   RewriteCond %{HTTPS} !=on
+#   RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
+#   RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
+# </IfModule>
+
+
+
+# ----------------------------------------------------------------------
+# Built-in filename-based cache busting
+# ----------------------------------------------------------------------
+
+# If you're not using the build script to manage your filename version revving,
+# you might want to consider enabling this, which will route requests for
+# /css/style.20110203.css to /css/style.css
+
+# To understand why this is important and a better idea than all.css?v1231,
+# read: github.com/paulirish/html5-boilerplate/wiki/Version-Control-with-Cachebusting
+
+# Uncomment to enable.
+# <IfModule mod_rewrite.c>
+#   RewriteCond %{REQUEST_FILENAME} !-f
+#   RewriteCond %{REQUEST_FILENAME} !-d
+#   RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
+# </IfModule>
+
+
+	
+# ----------------------------------------------------------------------
+# Prevent SSL cert warnings
+# ----------------------------------------------------------------------
+
+# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent 
+# https://www.example.com when your cert only allows https://secure.example.com
+# Uncomment the following lines to use this feature.
+
+# <IfModule mod_rewrite.c>
+#   RewriteCond %{SERVER_PORT} !^443
+#   RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
+# </IfModule>
+
+
+
+# ----------------------------------------------------------------------
+# Prevent 404 errors for non-existing redirected folders
+# ----------------------------------------------------------------------
+
+# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the same name does not exist 
+#   e.g. /blog/hello : webmasterworld.com/apache/3808792.htm
+
+Options -MultiViews 
+
+
+
+# ----------------------------------------------------------------------
+# Custom 404 page
+# ----------------------------------------------------------------------
+
+# You can add custom pages to handle 500 or 403 pretty easily, if you like.
+ErrorDocument 404 /404.html
+
+
+
+# ----------------------------------------------------------------------
+# UTF-8 encoding
+# ----------------------------------------------------------------------
+
+# Use UTF-8 encoding for anything served text/plain or text/html
+AddDefaultCharset utf-8
+
+# Force UTF-8 for a number of file formats
+AddCharset utf-8 .html .css .js .xml .json .rss .atom
+
+
+
+# ----------------------------------------------------------------------
+# A little more security
+# ----------------------------------------------------------------------
+
+
+# Do we want to advertise the exact version number of Apache we're running?
+# Probably not.
+## This can only be enabled if used in httpd.conf - It will not work in .htaccess
+# ServerTokens Prod
+
+
+# "-Indexes" will have Apache block users from browsing folders without a default document
+# Usually you should leave this activated, because you shouldn't allow everybody to surf through
+# every folder on your server (which includes rather private places like CMS system folders).
+Options -Indexes
+
+
+# Block access to "hidden" directories whose names begin with a period. This
+# includes directories used by version control systems such as Subversion or Git.
+<IfModule mod_rewrite.c>
+  RewriteRule "(^|/)\." - [F]
+</IfModule>
+
+
+# If your server is not already configured as such, the following directive
+# should be uncommented in order to set PHP's register_globals option to OFF.
+# This closes a major security hole that is abused by most XSS (cross-site
+# scripting) attacks. For more information: http://php.net/register_globals
+#
+# IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
+#
+# Your server does not allow PHP directives to be set via .htaccess. In that
+# case you must make this change in your php.ini file instead. If you are
+# using a commercial web host, contact the administrators for assistance in
+# doing this. Not all servers allow local php.ini files, and they should
+# include all PHP configurations (not just this one), or you will effectively
+# reset everything to PHP defaults. Consult www.php.net for more detailed
+# information about setting PHP directives.
+
+# php_flag register_globals Off
+
+# Rename session cookie to something else, than PHPSESSID
+# php_value session.name sid
+
+# Do not show you are using PHP
+# Note: Move this line to php.ini since it won't work in .htaccess
+# php_flag expose_php Off
+
+# Level of log detail - log all errors
+# php_value error_reporting -1
+
+# Write errors to log file
+# php_flag log_errors On
+
+# Do not display errors in browser (production - Off, development - On)
+# php_flag display_errors Off
+
+# Do not display startup errors (production - Off, development - On)
+# php_flag display_startup_errors Off
+
+# Format errors in plain text
+# Note: Leave this setting 'On' for xdebug's var_dump() output
+# php_flag html_errors Off
+
+# Show multiple occurrence of error
+# php_flag ignore_repeated_errors Off
+
+# Show same errors from different sources
+# php_flag ignore_repeated_source Off
+
+# Size limit for error messages
+# php_value log_errors_max_len 1024
+
+# Don't precede error with string (doesn't accept empty string, use whitespace if you need)
+# php_value error_prepend_string " "
+
+# Don't prepend to error (doesn't accept empty string, use whitespace if you need)
+# php_value error_append_string " "
+
+# Increase cookie security
+<IfModule php5_module>
+	php_value session.cookie_httponly true
+</IfModule>

File design/404.html

+<!doctype html>
+<html>
+<head>
+  <meta charset="utf-8">
+  <title>Page Not Found :(</title> 
+  <style>
+	  body { text-align: center;}
+	  h1 { font-size: 50px; text-align: center }
+	  span[frown] { transform: rotate(90deg); display:inline-block; color: #bbb; }
+	  body { font: 20px Constantia, 'Hoefler Text',  "Adobe Caslon Pro", Baskerville, Georgia, Times, serif; color: #999; text-shadow: 2px 2px 2px rgba(200, 200, 200, 0.5); }
+	  ::-moz-selection{ background:#FF5E99; color:#fff; }
+	  ::selection { background:#FF5E99; color:#fff; } 
+	  article {display:block; text-align: left; width: 500px; margin: 0 auto; }
+	  
+	  a { color: rgb(36, 109, 56); text-decoration:none; }
+	  a:hover { color: rgb(96, 73, 141) ; text-shadow: 2px 2px 2px rgba(36, 109, 56, 0.5); }
+  </style>
+</head>
+<body>
+     <article>
+	  <h1>Not found <span frown>:(</span></h1>
+	   <div>
+	       <p>Sorry, but the page you were trying to view does not exist.</p>
+	       <p>It looks like this was the result of either:</p>
+	       <ul>
+		   <li>a mistyped address</li>
+		   <li>an out-of-date link</li>
+	       </ul>
+	   </div>
+	    
+	    <script>
+	    var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),
+		GOOG_FIXURL_SITE = location.host;
+	    </script>
+	    <script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
+     </article>
+</body>
+</html>

File design/apple-touch-icon-114x114-precomposed.png

Added
New image

File design/apple-touch-icon-57x57-precomposed.png

Added
New image

File design/apple-touch-icon-72x72-precomposed.png

Added
New image

File design/apple-touch-icon-precomposed.png

Added
New image

File design/apple-touch-icon.png

Added
New image

File design/build/build.xml

+<?xml version="1.0"?>
+<!DOCTYPE project>
+<project name="Boilerplate Build" default="build" basedir="../"> <!-- one back since we're in build/ -->
+
+
+    <!-- Load in Ant-Contrib to give us access to some very useful tasks! -->
+    <!-- the .jar file is located in the tools directory -->
+    <taskdef resource="net/sf/antcontrib/antlib.xml">
+        <classpath>
+            <pathelement location="${basedir}/build/tools/ant-contrib-1.0b3.jar"/>
+        </classpath>
+    </taskdef>
+    
+    <!-- load shell environment -->
+    <property environment="ENV" />
+
+    <!-- load property files -->
+    <property file="build/config/project.properties"/>
+    <property file="build/config/default.properties"/>
+
+    <!-- merge the stylesheet properties -->
+    <var name="stylesheet-files" value="${file.default.stylesheets}, ${file.stylesheets}"/>
+
+    <!-- merge the pages properties -->
+    <var name="page-files" value="${file.pages}, ${file.pages.default.include}"/>
+
+    <!-- Test for Ant Version Delete this task and all instances of overwrite='no' if you can't upgrade to 1.8.2-->
+    <fail message="All features of the build script require Ant version 1.8.2. Please upgrade to 1.8.2 or remove all instances of 'overwrite=no' (and this fail task) from the build script to continue">
+        <condition>
+            <not>
+                <contains string="${ant.version}" substring="1.8.2"/>
+            </not>
+        </condition>
+    </fail>
+
+    <!--
+    *************************************************
+    * BASE TARGETS                                  *
+    *************************************************
+    -->
+    <target name="basics">
+    <if>
+        <equals arg1="${env}" arg2="dev"/>
+        <then>
+            <!-- Build a dev environment -->
+            <echo message="Building a Development Environment..."/>
+            <antcall target="-basics.dev"/>
+        </then>
+
+        <elseif>
+            <equals arg1="${env}" arg2="test"/>
+            <then>
+                <!-- Build a test environment -->
+                <echo message="Building a Test Environment..."/>
+                <antcall target="-basics.test"/>
+            </then>
+        </elseif>
+
+        <else>
+            <!-- Build a production environment -->
+            <echo message="Building a Production Environment..."/>
+            <antcall target="-basics.production"/>
+        </else>
+    </if>
+    </target>
+
+
+    <target name="text">
+    <if>
+        <equals arg1="${env}" arg2="dev"/>
+        <then>
+            <!-- Build a dev environment -->
+            <echo message="Building a Development Environment..."/>
+            <antcall target="-text.dev"/>
+        </then>
+
+        <elseif>
+            <equals arg1="${env}" arg2="test"/>
+            <then>
+                <!-- Build a test environment -->
+                <echo message="Building a Test Environment..."/>
+                <antcall target="-text.test"/>
+            </then>
+        </elseif>
+
+        <else>
+            <!-- Build a production environment -->
+            <echo message="Building a Production Environment..."/>
+            <antcall target="-text.production"/>
+        </else>
+    </if>
+    <antcall target="-imgcopy"/>
+    </target>
+
+
+    <target name="buildkit">
+    <if>
+        <equals arg1="${env}" arg2="dev"/>
+        <then>
+            <!-- Build a dev environment -->
+            <echo message="Building a Development Environment..."/>
+            <antcall target="-buildkit.dev"/>
+        </then>
+
+        <elseif>
+            <equals arg1="${env}" arg2="test"/>
+            <then>
+                <!-- Build a test environment -->
+                <echo message="Building a Test Environment..."/>
+                <antcall target="-buildkit.test"/>
+            </then>
+        </elseif>
+
+        <else>
+            <!-- Build a production environment -->
+            <echo message="Building a Production Environment..."/>
+            <antcall target="-buildkit.production"/>
+        </else>
+    </if>
+    </target>
+
+
+    <target name="build">
+    <if>
+        <equals arg1="${env}" arg2="dev"/>
+        <then>
+            <!-- Build a dev environment -->
+            <echo message="Building a Development Environment..."/>
+            <antcall target="-build.dev" />
+        </then>
+
+        <elseif>
+            <equals arg1="${env}" arg2="test"/>
+            <then>
+                <!-- Build a test environment -->
+                <echo message="Building a Test Environment..."/>
+                <antcall target="-build.test" />
+            </then>
+        </elseif>
+
+        <else>
+            <!-- Build a production environment -->
+            <echo message="Building a Production Environment..."/>
+            <antcall target="-build.production" />
+        </else>
+    </if>
+    </target>
+
+
+    <target name="minify">
+    <if>
+        <equals arg1="${env}" arg2="dev"/>
+        <then>
+            <!-- Build a dev environment -->
+            <echo message="Building a Development Environment..."/>
+            <antcall target="-minify.dev"/>
+        </then>
+
+        <elseif>
+            <equals arg1="${env}" arg2="test"/>
+            <then>
+                <!-- Build a test environment -->
+                <echo message="Building a Test Environment..."/>
+                <antcall target="-minify.test"/>
+            </then>
+        </elseif>
+
+        <else>
+            <!-- Build a production environment -->
+            <echo message="Building a Production Environment..."/>
+            <antcall target="-minify.production"/>
+        </else>
+    </if>
+    </target>
+
+    <target name="clean" depends="-clean"/>
+    
+    
+    
+    <!-- JSLint target, run separately -->
+    <target name="jslint">
+      <apply dir="${dir.source}/${dir.js}" executable="java" parallel="false" failonerror="true">
+            <fileset dir="./${dir.source}/">
+        <include name="**/${dir.js}/*.js"/>
+        <exclude name="**/*.min.js"/>
+        <exclude name="**/${dir.js.libs}/"/>
+        <exclude name="**/${dir.publish}/"/>
+          </fileset> 
+            <arg value="-jar" />
+            <arg path="./${dir.build.tools}/${tool.rhino}" />
+            <arg path="./${dir.build.tools}/${tool.jslint}" />
+            <srcfile/>
+            <arg value="${tool.jslint.opts}" />
+        </apply>        
+        <echo>JSLint Successful</echo>
+    </target>     
+  
+  
+    <!-- JSHint target, run separately -->
+    <target name="jshint">
+      <apply dir="${dir.source}/${dir.js}" executable="java" parallel="false" failonerror="true">
+            <fileset dir="./${dir.source}/">
+        <include name="**/${dir.js}/*.js"/>
+        <exclude name="**/*.min.js"/>
+        <exclude name="**/${dir.js.libs}/"/>
+        <exclude name="**/${dir.publish}/"/>
+          </fileset> 
+            <arg value="-jar" />
+            <arg path="./${dir.build.tools}/${tool.rhino}" />
+            <arg path="./${dir.build.tools}/${tool.jshint}" />
+            <srcfile/>
+            <arg value="${tool.jshint.opts}" />
+        </apply>        
+        <echo>JSHint Successful</echo>
+    </target>    
+       
+    <!-- CSSLint target, run separately -->
+    <target name="csslint">
+        <apply dir="${dir.source}/${dir.css}" executable="java" parallel="false" failonerror="true">
+            <fileset dir="./${dir.source}/">
+                <include name="**/${dir.css}/*.css"/>
+                <exclude name="**/*.min.css"/>
+                <exclude name="**/${dir.publish}/"/>
+            </fileset> 
+            <arg value="-jar" />
+            <arg path="./${dir.build.tools}/${tool.rhino}" />
+            <arg path="./${dir.build.tools}/${tool.csslint}" />
+            <srcfile/>
+            <arg value="${tool.csslint.opts}" />
+        </apply>
+        <echo>CSSLint Successful</echo>
+    </target>
+    
+    <!--
+    *************************************************
+    * BUILD TARGETS                                 *
+    *************************************************
+    -->
+
+    <!-- Target: basics -->
+    <target name="-basics.dev"
+            depends="-rev,
+                     -copy"/>
+
+    <target name="-basics.test"
+            depends="-rev,
+                     -usemin,
+                     -js.all.minify,
+                     -js.main.concat,
+                     -js.mylibs.concat,
+                     -js.scripts.concat,
+                     -css,
+                     -manifest,
+                     -copy"/>
+
+    <target name="-basics.production"
+            depends="-rev,
+                     -usemin,
+                     -js.all.minify,
+                     -js.main.concat,
+                     -js.mylibs.concat,
+                     -js.scripts.concat,
+                     -css,
+                     -manifest,
+                     -copy"/>
+
+    <!-- Target: text -->
+    <target name="-text.dev"
+            depends="-rev,
+                     -copy"/>
+
+    <target name="-text.test"
+            depends="-rev,
+                     -usemin,
+                     -js.all.minify,
+                     -js.main.concat,
+                     -js.mylibs.concat,
+                     -js.scripts.concat,
+                     -css,
+                     -manifest,
+                     -htmlclean,
+                     -copy"/>
+
+    <target name="-text.production"
+            depends="-rev,
+                     -usemin,
+                     -js.all.minify,
+                     -js.main.concat,
+                     -js.mylibs.concat,
+                     -js.scripts.concat,
+                     -css,
+                     -manifest,
+                     -htmlclean,
+                     -copy"/>
+
+    <!-- Target: buildkit -->
+    <target name="-buildkit.dev"
+            depends="-rev,
+                     -imagespng,
+                     -imagesjpg,
+                     -copy"/>
+
+    <target name="-buildkit.test"
+            depends="-rev,
+                     -usemin,
+                     -js.all.minify,
+                     -js.main.concat,
+                     -js.mylibs.concat,
+                     -js.scripts.concat,
+                     -css,
+                     -manifest,
+                     -htmlbuildkit,
+                     -imagespng,
+                     -imagesjpg,
+                     -copy"/>
+
+    <target name="-buildkit.production"
+            depends="-rev,
+                     -usemin,
+                     -js.all.minify,
+                     -js.main.concat,
+                     -js.mylibs.concat,
+                     -js.scripts.concat,
+                     -css,
+                     -manifest,
+                     -htmlbuildkit,
+                     -imagespng,
+                     -imagesjpg,
+                     -copy"/>
+
+    <!-- Target: build -->
+    <target name="-build.dev"
+            depends="-rev,
+                     -imagespng,
+                     -imagesjpg,
+                     -copy"/>
+
+    <target name="-build.test"
+            depends="-rev,
+                     -usemin,
+                     -js.all.minify,
+                     -js.main.concat,
+                     -js.mylibs.concat,
+                     -js.scripts.concat,
+                     -css,
+                     -manifest,
+                     -htmlclean,
+                     -imagespng,
+                     -imagesjpg,
+                     -copy"/>
+
+    <target name="-build.production"
+            depends="-rev,
+                     -usemin,
+                     -js.all.minify,
+                     -js.main.concat,
+                     -js.mylibs.concat,
+                     -js.scripts.concat,
+                     -css,
+                     -manifest,
+                     -htmlclean,
+                     -imagespng,
+                     -imagesjpg,
+                     -copy"/>
+
+    <!-- Target: minify -->
+    <target name="-minify.dev"
+            depends="-rev,
+                     -imagespng,
+                     -imagesjpg,
+                     -copy"/>
+
+    <target name="-minify.test"
+            depends="-rev,
+                     -usemin,
+                     -js.all.minify,
+                     -js.main.concat,
+                     -js.mylibs.concat,
+                     -js.scripts.concat,
+                     -css,
+                     -manifest,
+                     -htmlcompress,
+                     -imagespng,
+                     -imagesjpg,
+                     -copy"/>
+
+    <target name="-minify.production"
+            depends="-rev,
+                     -usemin,
+                     -js.all.minify,
+                     -js.main.concat,
+                     -js.mylibs.concat,
+                     -js.scripts.concat,
+                     -css,
+                     -manifest,
+                     -htmlcompress,
+                     -imagespng,
+                     -imagesjpg,
+                     -copy"/>
+
+    <!--
+    *************************************************
+    * FUNCTION TARGETS                              *
+    *************************************************
+    -->
+        
+    <target name="-clean" description="(PRIVATE) Wipe the previous build (Deletes the dir.publish directory">
+    <!-- This is a private target -->        
+        <echo message="Cleaning up previous build directory..."/>
+        <delete dir="./${dir.intermediate}/"/>
+        <delete dir="./${dir.publish}/"/>
+    </target>
+    
+    
+    <target name="-rev" description="(PRIVATE) Increase the current build number by one and set build date">
+    <!-- This is a private target -->
+    
+        <echo message="====================================================================="/>
+        <echo message="Welcome to the HTML5 Boilerplate Build Script!"/>
+        <echo message=" "/>
+        <echo message="We're going to get your site all ship-shape and ready for prime time."/>
+        <echo message=" "/>
+        <echo message="This should take somewhere between 15 seconds and a few minutes,"/>
+        <echo message="mostly depending on how many images we're going to compress."/>
+        <echo message=" "/>
+        <echo message="Feel free to come back or stay here and follow along."/>
+        <echo message="====================================================================="/>
+        <echo message=" "/>
+        <echo message=" "/>
+    
+    </target>
+    
+    <target name="-mkdirs">
+      <if>
+          <or>
+            <equals arg1="${dir.publish}" arg2="."/>            
+            <equals arg1="${dir.publish}" arg2=".."/>                      
+            <equals arg1="${dir.publish}" arg2="/"/>                      
+            <equals arg1="${dir.publish}" arg2="./"/>                      
+            <equals arg1="${dir.publish}" arg2="../"/>                      
+          </or>
+          <then>
+            <fail message="Your dir.publish folder is set to ${dir.publish} which could delete your entire site or worse. Change it in project.properties"/>      
+          </then>
+          <else>
+            <echo message="Creating directory structure... ${dir.publish}"/>
+
+            <mkdir dir="${dir.intermediate}"/>
+            <copy todir="${dir.intermediate}" includeEmptyDirs="true">
+                <fileset dir="${dir.source}/" excludes="${file.default.exclude}, ${file.exclude}">
+                    <type type="dir"/>
+                </fileset>
+            </copy>
+              <mkdir dir="${dir.publish}"/>
+              <copy todir="${dir.publish}" includeEmptyDirs="true">
+                  <fileset dir="${dir.source}/" excludes="${file.default.exclude}, ${file.exclude}">
+                      <type type="dir"/>
+                  </fileset>
+              </copy>                      
+          </else>
+      </if>                  
+    </target>
+    
+    <target name="-copy" depends="-mkdirs">
+    <!-- This is a private target -->
+    
+        <echo message="Copying over new files..."/>
+
+        <copy todir="./${dir.publish}">
+            <fileset dir="${dir.source}/" excludes="${file.default.exclude}, ${file.exclude}">
+                <!-- exclude files that are superseded by optimized versions with different names -->
+                <!-- this is not strictly necessary, but it avoids putting unreferenced files into your server -->
+                <exclude name="${dir.js}/**/*.js"/>
+                <exclude name="${dir.css}/**/*.css"/>
+                <exclude name="${file.manifest}"/>
+            </fileset>
+        </copy>
+        
+        <echo message="A copy of all non-dev files are now in: ./${dir.publish}."/>
+    </target>
+    
+    <!-- JAVASCRIPT -->
+    <target name="-js.main.concat" depends="-js.all.minify" description="(PRIVATE) Concatenates the JS files in dir.js">
+        <echo message="Concatenating Main JS scripts..."/>
+        <!-- overwrite=no here means not to overwrite if the target is newer than the sources -->
+        <concat destfile="./${dir.intermediate}/${dir.js}/scripts-concat.js" overwrite="no">
+            <fileset dir="./${dir.intermediate}/">
+                <include name="${dir.js.main}/plugins.js"/>
+                <include name="${dir.js.main}/script.js"/>
+            </fileset>      
+        </concat>
+    </target>
+    
+    <target name="-js.mylibs.concat" depends="-js.all.minify" description="(PRIVATE) Concatenates the JS files in dir.js.mylibs">
+        <mkdir dir="./${dir.intermediate}/${dir.js.mylibs}"/>
+
+        <echo message="Concatenating JS libraries"/>
+        <!-- overwrite=no here means not to overwrite if the target is newer than the sources -->
+        <concat destfile="./${dir.intermediate}/${dir.js}/mylibs-concat.js" overwrite="no">
+            <fileset dir="./${dir.intermediate}/${dir.js.mylibs}/"
+                includes="**/*.js" 
+                excludes="${file.js.bypass}"/>                
+                  
+        </concat>
+    </target>
+    
+    
+    <target name="-js.scripts.concat" depends="-js.main.concat,-js.mylibs.concat" if="build.concat.scripts">
+        <echo message="Concatenating library file with main script file"/>
+        <!-- overwrite=no here means not to overwrite if the target is newer than the sources -->
+        <concat destfile="./${dir.intermediate}/${dir.js}/scripts-concat.min.js" overwrite="no">
+            <fileset dir="./${dir.intermediate}/${dir.js}/">
+                <include name="mylibs-concat.js"/>
+                <include name="scripts-concat.js"/>
+            </fileset>      
+        </concat>
+
+        <checksum file="${dir.intermediate}/${dir.js}/scripts-concat.min.js" algorithm="sha" property="scripts.sha" />
+        <if>
+            <isset property="gae.js_dir" />
+            <then>
+                <property name="scripts.js" value="${gae.js_dir}/${scripts.sha}.js" />
+            </then>
+            <else>
+                <property name="scripts.js" value="${dir.js}/${scripts.sha}.js" />
+            </else>
+        </if>
+        <copy file="${dir.intermediate}/${dir.js}/scripts-concat.min.js" tofile="${dir.publish}/${dir.js}/${scripts.sha}.js" />
+    </target>
+    
+    
+    <target name="-js.all.minify" depends="-mkdirs" description="(PRIVATE) Minifies the scripts.js files created by js.scripts.concat">
+        <echo message="Minifying scripts"/>
+        <copy todir="${dir.intermediate}/">
+            <fileset dir="${dir.source}/" includes="${dir.js}/**/*.min.js"  />
+        </copy>
+        <apply executable="java" parallel="false">
+            <fileset dir="${dir.source}/" >
+                <include name="${dir.js}/**/*.js"/>
+                <exclude name="${dir.js}/**/*.min.js"/>
+            </fileset>
+            <arg line="-jar"/>
+            <arg path="./${dir.build.tools}/${tool.yuicompressor}"/>
+            <srcfile/>
+            <arg line="--line-break"/>
+            <arg line="4000"/>
+            <arg line="-o"/>
+            <mapper type="glob" from="*.js" to="${basedir}/${dir.intermediate}/*.js"/>
+            <targetfile/>
+        </apply>
+
+        <!-- at this point all js files are minified with their original names -->
+
+        <copy todir="${dir.publish}/">
+          <fileset dir="${dir.intermediate}/">
+              <include name="${dir.js}/**/*.js"/>
+              <exclude name="${dir.js.mylibs}/**/*.js"/>
+              <exclude name="${dir.js}/scripts-concat.js"/>
+              <exclude name="${dir.js}/mylibs-concat.js"/>
+              <exclude name="${dir.js}/scripts-concat.min.js"/>
+              <exclude name="${dir.js}/plugins.js"/>
+              <exclude name="${dir.js}/script.js"/>
+          </fileset>                                   
+        </copy>
+        <copy todir="${dir.publish}/${dir.js.mylibs}/">
+            <fileset dir="${dir.source}/${dir.js.mylibs}/"
+            includes="${file.js.bypass}"/>           
+        </copy>
+    </target>
+    
+    
+    <!-- HTML -->
+    <target name="-usemin" depends="-js.scripts.concat,-css" description="(PRIVATE) Replaces references to non-minified scripts">
+        <echo message="Switching to minified js files..."/>
+
+        <!-- Changes to style.css or scripts.js mean that the html must be updated, and it will be.
+             Unfortunately, the html we want to update may not have the tags we want to replace(because it was updated before).
+             This outofdate check ensures that the html files have the markers for us to replace. -->
+        <outofdate property="needhtmlrefresh">
+            <sourcefiles>
+                <fileset dir="${dir.publish}" includes="${style.css}, ${scripts.js}"/>
+            </sourcefiles>
+            <targetfiles>
+                <fileset dir="${dir.intermediate}" includes="${page-files}"/>
+            </targetfiles>
+        </outofdate>
+
+        <!-- force the files to be overwritten with older copies from source if needhtmlrefresh is set -->
+        <copy todir="${dir.intermediate}" overwrite="${needhtmlrefresh}">
+            <fileset dir="${dir.source}" includes="${page-files}"/>
+        </copy>
+
+        <!-- switch from a regular jquery to minified -->
+        <replaceregexp match="jquery-(\d|\d(\.\d)+)\.js" replace="jquery-\1.min.js" flags="g">
+            <fileset dir="./${dir.intermediate}" includes="${page-files}"/>
+        </replaceregexp>
+        <!-- switch any google CDN reference to minified -->
+        <replaceregexp match="(\d|\d(\.\d)+)\/jquery\.js" replace="\1/jquery.min.js" flags="g">
+            <fileset dir="./${dir.intermediate}" includes="${page-files}"/>
+        </replaceregexp>    
+
+        <echo>Kill off those versioning flags: ?v=2</echo>
+        <replaceregexp match='\?v=\d+">' replace='">' flags="g">
+            <fileset dir="./${dir.intermediate}" includes="${page-files}"/>
+        </replaceregexp>
+        
+        <echo>Remove favicon.ico reference if it is pointing to the root</echo>
+        <replaceregexp match="&lt;link rel=[&quot;']shortcut icon[&quot;'] href=[&quot;']/favicon\.ico[&quot;']&gt;" replace="">
+            <fileset dir="${dir.intermediate}" includes="${page-files}"/>
+        </replaceregexp>
+        <!-- we maintain the apple-touch-icon reference for Android 2.2   www.ravelrumba.com/blog/android-apple-touch-icon
+        <replace token="&lt;link rel=&quot;apple-touch-icon&quot; href=&quot;/apple-touch-icon.png&quot;>" value="">
+            <fileset dir="${dir.intermediate}" includes="${page-files}"/>
+        </replace>
+        -->
+
+        <echo message="Update the HTML to reference our concatenated script file: ${scripts.js}"/>
+        <!-- style.css replacement handled as a replacetoken above -->
+        <replaceregexp match="&lt;!-- scripts concatenated [\d\w\s\W]*?!-- end ((scripts)|(concatenated and minified scripts))--&gt;" replace="&lt;script defer src='${scripts.js}\'&gt;&lt;/script&gt;" flags="m">
+            <fileset dir="${dir.intermediate}" includes="${page-files}"/>
+        </replaceregexp>
+        <!--[! use comments like this one to avoid having them get minified -->
+
+        <echo message="Updating the HTML with the new css filename: ${style.css}"/>
+
+        <replaceregexp match="&lt;!-- CSS concatenated [\d\w\s\W]*?!-- end CSS--&gt;" replace="&lt;link rel='stylesheet' href='${style.css}'&gt;" flags="m">
+            <fileset dir="${dir.intermediate}" includes="${page-files}"/>
+        </replaceregexp>
+
+    </target>
+    
+    
+    <target name="-manifest" depends="-usemin">
+        <if>
+            <isset property="file.manifest" />
+            <then>
+                <echo message="copying a fresh ${dir.build}/config/${file.manifest} to /${dir.intermediate}"/>
+
+                <delete file="${dir.intermediate}/${file.manifest}"/>
+                <copy file="${dir.build}/config/${file.manifest}" tofile="${dir.intermediate}/${file.manifest}" />
+                
+                <echo message="manifest creation" />
+
+                <!-- update version -->
+                <echo message="Updating the site.manifest version date to today, current time"/>
+                <tstamp>
+                    <format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss"/>
+                </tstamp>
+                <replaceregexp match="# version .+" replace="# version ${TODAY}" file="${dir.intermediate}/${file.manifest}"/>
+
+                <!-- add html files -->
+                <echo message="Updating the site.manifest with html files: ${page-files}"/>
+                <for list="${page-files}" param="file" delimiter="," trim="true">
+                    <sequential>
+                        <replaceregexp match="# html files" replace="# html files${line.separator}@{file}" file="${dir.intermediate}/${file.manifest}" />
+                    </sequential>
+                </for>
+                
+                <!-- add stylesheet files -->
+                <echo message="Updating the site.manifest with the new css filename: ${style.css}"/>
+                <replace token="# css files" value="# css files${line.separator}${style.css}" file="${dir.intermediate}/${file.manifest}" />
+
+                <!-- add javascript files -->
+                <echo message="Updating the site.manifest with the new js filename: ${scripts.js}"/>
+                <for param="file">
+                    <path>
+                        <fileset dir="./${dir.intermediate}/${dir.js.mylibs}/"
+                            includes="${file.js.bypass}" />
+                    </path>
+                    <sequential>
+                        <basename property="filename.@{file}" file="@{file}" />
+                        <replaceregexp match="# js files" replace="# js files${line.separator}${dir.js.mylibs}/${filename.@{file}}" file="${dir.intermediate}/${file.manifest}" />
+                    </sequential>
+                </for>
+                <for param="file">
+                    <path>
+                        <fileset dir="./${dir.intermediate}/${dir.js.libs}/"
+                            includes="*.min.js"/>
+                    </path>
+                    <sequential>
+                        <basename property="filename.@{file}" file="@{file}" />
+                        <replaceregexp match="# js files" replace="# js files${line.separator}${dir.js.libs}/${filename.@{file}}" file="${dir.intermediate}/${file.manifest}" />
+                    </sequential>
+                </for>
+                <replace token="# js files" value="# js files${line.separator}${scripts.js}" file="${dir.intermediate}/${file.manifest}" />
+                
+                <echo message="copying ${file.manifest} to /${dir.publish}"/>
+                <copy file="${dir.intermediate}/${file.manifest}" tofile="${dir.publish}/${file.manifest}" />
+                
+                <echo>Add manifest attribute to HTML: </echo>
+                <replaceregexp match="&lt;html (.*?)>\s*?&lt;!--&lt;!\[endif" replace='&lt;html \1 manifest="${file.manifest}"> &lt;!--&lt;![endif' flags="g">
+                    <fileset dir="./${dir.intermediate}" includes="${page-files}"/>
+                </replaceregexp>
+                
+            </then>
+            <else>
+                <echo message="no manifest.appcache generated!" />
+            </else>
+        </if>
+    </target>
+    
+    <target name="-htmlclean" depends="-usemin">
+        <echo message="Run htmlcompressor on the HTML"/>
+        <echo message=" - maintaining whitespace"/>
+        <echo message=" - removing html comments"/>
+        <echo message=" - compressing inline style/script tag contents"/>
+        <apply executable="java" parallel="false" dest="./${dir.publish}/" >
+            <fileset dir="./${dir.intermediate}/" includes="${page-files}"/>
+            <arg value="-jar"/>
+            <arg path="./${dir.build.tools}/${tool.htmlcompressor}"/>
+            <arg line="--preserve-multi-spaces"/>
+            <arg line="--remove-quotes"/>
+            <arg line="--compress-js"/>
+            <arg line="--compress-css"/>
+            <arg line="--preserve-php"/>
+            <arg line="--preserve-ssi"/>
+            <srcfile/>
+            <arg value="-o"/>
+            <mapper type="glob" from="*" to="../${dir.publish}/*"/>
+            <targetfile/>
+        </apply>
+    </target>
+    
+    
+    <target name="-htmlbuildkit" depends="-usemin">
+        <echo message="Run htmlcompressor on the HTML"/>
+        <echo message=" - maintaining whitespace"/>
+        <echo message=" - retain html comments"/>
+        <echo message=" - compressing inline style/script tag contents"/>
+        <apply executable="java" parallel="false" dest="./${dir.publish}/" >
+            <fileset dir="./${dir.intermediate}/" includes="${page-files}"/>
+            <arg value="-jar"/>
+            <arg path="./${dir.build.tools}/${tool.htmlcompressor}"/>
+            <arg value="--preserve-comments"/>
+            <arg line="--preserve-multi-spaces"/>
+            <arg line="--compress-js"/>
+            <arg line="--compress-css"/>
+            <arg line="--preserve-php"/>
+            <arg line="--preserve-ssi"/>
+            <srcfile/>
+            <arg value="-o"/>
+            <mapper type="glob" from="*" to="../${dir.publish}/*"/>
+            <targetfile/>
+        </apply>
+    </target>
+    
+    
+    <target name="-htmlcompress" depends="-usemin">
+        <echo message="Run htmlcompressor on the HTML"/>
+        <echo message=" - removing unnecessary whitespace"/>
+        <echo message=" - removing html comments"/>
+        <echo message=" - compressing inline style/script tag contents"/>
+        <apply executable="java" parallel="false" dest="./${dir.publish}/" >
+            <fileset dir="./${dir.intermediate}/" includes="${page-files}"/>
+            <arg value="-jar"/>
+            <arg path="./${dir.build.tools}/${tool.htmlcompressor}"/>
+            <arg line="--remove-quotes"/>
+            <arg line="--compress-js"/>
+            <arg line="--compress-css"/>
+            <arg line="--preserve-php"/>
+            <arg line="--preserve-ssi"/>
+            <srcfile/>
+            <arg value="-o"/>
+            <mapper type="glob" from="*" to="../${dir.publish}/*"/>
+            <targetfile/>
+        </apply>
+    </target>
+
+
+    <!-- CSS -->
+
+    <target name="-css-remove-concatenated-stylesheets">
+            <echo>Removing ${css_file} from html</echo>
+            <replaceregexp match="&lt;link.+href=&quot;.*${css_file}&quot;.*&gt;" replace="  ">
+                <fileset dir="${dir.intermediate}" includes="${page-files}"/>
+            </replaceregexp>       
+    </target>
+        
+
+    <target name="css-split" description="turns style.css into multiple files @imported together">
+        <copy file="${dir.source}/${dir.css}/${file.root.stylesheet}" tofile="${dir.source}/${dir.css}/${file.root.stylesheet}.temp"/>
+        
+        <replaceregexp file="${dir.source}/${dir.css}/${file.root.stylesheet}.temp" 
+               match=".*" 
+               replace="/* remove me */" flags="s" />
+    
+        <loadfile property="root" srcfile="${dir.source}/${dir.css}/${file.root.stylesheet}"/>
+        <var name="curr.buffer" value=""/>
+    
+        <for delimiter="${line.separator}" param="currline" list="${root}">
+            <sequential>
+                <!-- does this line contain an h5bp-import? -->
+                <propertyregex property="export.name" input="@{currline}" regexp="^.*==\|== +(.*) +==+$" select="\1" casesensitive="true" override="true" />
+                <if>
+                    <isset property="export.name"/>
+                    <then>
+                        <propertyregex property="export.name" input="${export.name}" regexp=" " replace="." global="true" override="true" />
+                        <var name="export.name" value="${export.name}.css"/>           
+                    
+                        <if>
+                            <isset property="curr.file"/>
+                            <then>
+                                <!-- create curr.file -->
+                                <copy file="${dir.source}/${dir.css}/${file.root.stylesheet}" tofile="${dir.source}/${dir.css}/${curr.file}" overwrite="true"/>
+                                <!-- write the curr.buffer into the curr.file -->
+                                <replaceregexp file="${dir.source}/${dir.css}/${curr.file}" 
+                                       match=".*" 
+                                       replace="${curr.buffer}" flags="s" />
+                                
+                                <var name="curr.buffer" value=""/>
+                                <var name="curr.file" unset="true"/>
+                            </then>
+                        </if>
+                        <var name="curr.file" value="${export.name}"/>
+                        <var name="export.name" unset="true"/>
+
+                        <!-- insert import line into new root -->
+                        <replace file="${dir.source}/${dir.css}/${file.root.stylesheet}.temp" token="/* remove me */" value="@import url(${curr.file});${line.separator}/* remove me */"/>
+                    </then>
+                </if>
+                <var name="curr.buffer" value="${curr.buffer}@{currline}${line.separator}" />                                        
+            </sequential>
+        </for>
+        <!-- one more time to write out the last file -->
+        <if>
+            <isset property="curr.file"/>
+            <then>
+                <!-- create curr.file -->
+                <copy file="${dir.source}/${dir.css}/${file.root.stylesheet}" tofile="${dir.source}/${dir.css}/${curr.file}" overwrite="true"/>
+                <!-- write the curr.buffer into the curr.file -->
+                <replaceregexp file="${dir.source}/${dir.css}/${curr.file}" 
+                       match=".*" 
+                       replace="${curr.buffer}" flags="s" />
+                
+                <var name="curr.buffer" value=""/>
+                <var name="curr.file" unset="true"/>
+            </then>
+        </if>
+        <replace file="${dir.source}/${dir.css}/${file.root.stylesheet}.temp" token="/* remove me */" value="${curr.buffer}"/>
+        <copy file="${dir.source}/${dir.css}/${file.root.stylesheet}" tofile="${dir.source}/${dir.css}/${file.root.stylesheet}.orig" overwrite="false"/>
+        <move file="${dir.source}/${dir.css}/${file.root.stylesheet}.temp" tofile="${dir.source}/${dir.css}/${file.root.stylesheet}" overwrite="false"/>
+    </target>
+    
+    <target name="-css" depends="-mkdirs" description="Concatenates and Minifies any stylesheets listed in the file.stylesheets property">
+        <echo message="Concatenating any @imports..."/>
+
+        <!-- copy source file to intermediate directory -->
+        <copy file="${dir.source}/${dir.css}/${file.root.stylesheet}" tofile="${dir.intermediate}/${dir.css}/${file.root.stylesheet}"/>
+
+        <!-- replace imports with h5bp-import tags (part 1) this one wraps @media types -->
+        <replaceregexp file="${dir.intermediate}/${dir.css}/${file.root.stylesheet}" 
+                        match="^@import\s+(?:url\s*\(\s*['&quot;]?|['&quot;])((?!http:|https:|ftp:)[^&quot;^'^\s]+)(?:['&quot;]?\s*\)|['&quot;])\s*([\w\s,\-]*);.*$"
+                       replace="@media \2{ /* h5bp-import: \1 */ }" byline="true" />
+        
+        <!-- replace imports with h5bp-import tags (part 2) -->
+        <replaceregexp file="${dir.intermediate}/${dir.css}/${file.root.stylesheet}" 
+                       match="^@media \{ (/\* .* \*/) \}" replace="\1" byline="true" />
+
+        <!-- copy skeleton to concat file -->
+        <copy file="${dir.intermediate}/${dir.css}/${file.root.stylesheet}"
+              tofile="${dir.intermediate}/${dir.css}/style-concat.css" overwrite="true"/>
+
+        <!-- load the file into a property -->
+        <loadfile property="imports" srcfile="${dir.intermediate}/${dir.css}/${file.root.stylesheet}"/>
+
+        <var name="concat-files" value="${file.root.stylesheet}"/>
+
+        <!-- go over the file line by line -->
+        <for delimiter="${line.separator}" param="import" list="${imports}">
+            <sequential>
+                <!-- does this line contain an h5bp-import? -->
+                <propertyregex property="file.name" input="@{import}" regexp="/\* h5bp-import: (.*) \*/" select="\1" casesensitive="true" override="true" />
+
+                <if>
+                    <isset property="file.name"/>
+                    <then>
+                        <var name="concat-files" value="${file.name},${concat-files}"/>
+
+                        <!-- load the file into a variable -->
+                        <loadfile property="file.contents" srcFile="${dir.source}/${dir.css}/${file.name}"/>
+
+                        <!-- pop that file into the concatenated output file -->
+                        <replace file="${dir.intermediate}/${dir.css}/style-concat.css" token="/* h5bp-import: ${file.name} */" value="${file.contents}"/>
+
+                        <var name="file.contents" unset="true"/>
+                    </then>
+                </if>
+            </sequential>
+        </for>
+        <echo message="Minifying css..."/>
+        
+        <apply executable="java" parallel="false">
+            <fileset dir="${dir.intermediate}/${dir.css}/" includes="style-concat.css"/>
+            <arg line="-jar"/>
+            <arg path="${dir.build.tools}/${tool.yuicompressor}"/>
+            <srcfile/>
+            <arg line="-o"/>
+            <mapper type="merge" to="${basedir}/${dir.intermediate}/${dir.css}/style-concat.min.css"/>
+            <targetfile/>
+        </apply>
+
+        <checksum file="${dir.intermediate}/${dir.css}/style-concat.min.css" algorithm="sha" property="css.sha" />
+        <if>
+            <isset property="gae.css_dir" />
+            <then>
+                <property name="style.css" value="${gae.css_dir}/${css.sha}.css" />
+            </then>
+            <else>
+                <property name="style.css" value="${dir.css}/${css.sha}.css" />
+            </else>
+        </if>
+        <copy file="${dir.intermediate}/${dir.css}/style-concat.min.css" tofile="${dir.publish}/${dir.css}/${css.sha}.css" />
+
+        <echo message="Minifying any unconcatenated css files..."/>
+
+        <apply executable="java" parallel="false">
+            <fileset dir="${dir.source}/${dir.css}/" excludes="${concat-files}" includes="**/*.css"/>
+            <arg line="-jar"/>
+            <arg path="${dir.build.tools}/${tool.yuicompressor}"/>
+            <srcfile/>
+            <arg line="-o"/>
+            <mapper type="glob" from="*.css" to="${basedir}/${dir.publish}/${dir.css}/*.css"/>
+            <targetfile/>
+        </apply>
+        <foreach list="${file.stylesheets}" param="css_file" target="-css-remove-concatenated-stylesheets" />        
+    </target>
+    
+    
+    <!-- IMAGES -->
+    <target name="-imagespng" depends="-mkdirs" description="(PRIVATE) Optimizes .png images using optipng">
+        <echo message="Optimizing images..."/>
+        <echo message="This part might take a while. But everything else is already done."/>
+        <echo message=" "/>
+        
+        
+        <echo message="First, we run optipng on the .png files..."/>
+        
+        <!-- osfamily=unix is actually true on OS X as well -->
+        <!-- On *nix's and OS X, check for optipng and give a helpful message if it's not installed -->
+        <if>
+            <and>
+                <os family="unix" />
+                <available file="optipng" filepath="${ENV.PATH}" />
+            </and>
+            <then>
+                <!-- work around https://sourceforge.net/tracker/?func=detail&aid=2671422&group_id=151404&atid=780916 -->
+                <delete>
+                    <fileset dir="./${dir.publish}/${dir.images}/">
+                        <include name="**/*.png"/>
+                    </fileset>
+                </delete>
+                <apply executable="optipng" dest="./${dir.publish}/${dir.images}/" osfamily="unix">
+                    <fileset dir="./${dir.source}/${dir.images}/" includes="**/*.png"  excludes="${images.bypass}, ${images.default.bypass}"/>
+                    <arg value="-quiet"/>
+                    <arg value="-o7"/>
+                    <arg value="-out"/>
+                    <targetfile/>
+                    <srcfile/>
+                    <mapper type="identity"/>
+                </apply>
+            </then>
+            <elseif>
+                <os family="unix" />
+                <then>
+                    <echo message="*** optipng NOT INSTALLED. SKIPPING OPTIMIZATION OF PNGs." />
+                    <echo message="*** Install optipng to enable png optimization." />
+                    <echo message="*** For instructions see 'Dependencies' at: http://html5boilerplate.com/docs/#Build-script#dependencies" />
+                </then>
+            </elseif>
+        </if>
+
+        <!-- work around https://sourceforge.net/tracker/?func=detail&aid=2671422&group_id=151404&atid=780916 -->
+        <delete>
+            <fileset dir="./${dir.publish}/${dir.images}/">
+                <include name="**/*.png"/>
+            </fileset>
+        </delete>
+        <apply executable="${basedir}/${dir.build.tools}/optipng-0.6.4-exe/optipng.exe" dest="./${dir.publish}/${dir.images}/" osfamily="windows">
+            <fileset dir="./${dir.source}/${dir.images}/" includes="**/*.png"  excludes="${images.bypass}, ${images.default.bypass}"/>
+            <arg value="-quiet"/>
+            <arg value="-o7"/>
+            <arg value="-out"/>
+            <targetfile/>
+            <srcfile/>
+            <mapper type="identity"/>
+        </apply>
+    </target>
+
+
+    <target name="-imagesjpg" depends="-mkdirs" description="(PRIVATE) Optimizes .jpg images using jpegtan">
+        <echo message="Now, we clean up those jpgs..."/>
+
+        <if>
+            <equals arg1="${images.strip.metadata}" arg2="true"/>
+            <then>
+                <var name="strip-meta-tags" value="none"/>
+            </then>
+            <else>
+                <var name="strip-meta-tags" value="all"/>
+            </else>
+        </if>
+
+        <!-- On *nix's and OS X, check for jpegtran and give a helpful message if it's not installed -->
+        <if>
+            <and>
+                <os family="unix" />
+                <available file="jpegtran" filepath="${ENV.PATH}" />
+            </and>
+            <then>
+                <apply executable="jpegtran" dest="./${dir.publish}/${dir.images}" osfamily="unix">
+                    <fileset dir="${dir.source}/${dir.images}" includes="**/*.jpg" excludes="${images.bypass}, ${images.default.bypass}"/>
+                    <arg value="-copy"/>
+                    <arg value="${strip-meta-tags}"/>
+                    <arg value="-optimize"/>
+                    <arg value="-outfile"/>
+                    <targetfile/>
+                    <srcfile/>
+                    <mapper type="identity"/>
+                    <!-- you may want to flag optimized images. If so, do it here. Otherwise change this to type="identity" -->
+                    <!--<mapper type="glob" from="*.jpg" to="*.jpg"/>-->
+                </apply>
+            </then>
+            <elseif>
+                <os family="unix" />
+                <then>
+                    <echo message="*** jpegtran NOT INSTALLED. SKIPPING OPTIMIZATION OF JPEGs." />
+                    <echo message="*** Install jpegtran to enable jpeg optimization." />
+                    <echo message="*** For instructions see 'Dependencies' at: http://html5boilerplate.com/docs/#Build-script#dependencies" />
+                </then>
+            </elseif>
+        </if>
+
+        <apply executable="${basedir}/${dir.build.tools}/jpegtran.exe" dest="./${dir.publish}/${dir.images}" osfamily="windows">
+            <fileset dir="${dir.source}/${dir.images}" includes="**/*.jpg"  excludes="${images.bypass}, ${images.default.bypass}"/>
+            <arg value="-copy"/>
+            <arg value="${strip-meta-tags}"/>
+            <arg value="-optimize"/>
+            <arg value="-outfile"/>
+            <targetfile/>
+            <srcfile/>
+            <mapper type="identity"/>
+            <!-- you may want to flag optimized images. If so, do it here. Otherwise change this to type="identity" -->
+            <!--<mapper type="glob" from="*.jpg" to="*.jpg"/>-->
+        </apply>
+    </target>
+
+
+    <target name="-imgcopy" depends="-mkdirs">
+        <echo message="Copying over the unmodified images."/>
+
+        <copy todir="./${dir.publish}/${dir.images}">
+            <fileset dir="${dir.source}/${dir.images}"  includes="**/*.jpg, **/*.png"/>
+        </copy> 
+    </target>
+    
+</project>

File design/build/config/default.properties

+#
+# Default Build Settings
+# you can override these settings on a project basis in a project.properties file
+# so probably best not to touch these as they could be overwritten in later versions!
+#
+
+
+#
+# Directory Paths
+#
+dir.source          = .
+dir.intermediate    = intermediate
+dir.publish         = publish
+dir.build           = build
+dir.build.tools     = ${dir.build}/tools
+dir.test            = test
+dir.demo            = demo
+dir.js              = js
+dir.js.main         = ${dir.js}
+# scripts in the lib directory will only be minified, not concatenated together
+dir.js.libs         = ${dir.js}/libs
+dir.js.mylibs       = ${dir.js}/mylibs
+dir.css             = css
+dir.images          = img
+
+
+#
+# HTML, PHP, etc files to clean and update script/css references
+#
+file.pages.default.include  = index.html, 404.html
+
+# You will need to include the property file.pages.include in your project.properties file
+# and add any extra pages you want to be updated by the scripts in a comma separated list
+
+
+# the server configuration you're going with. If you don't use apache,
+#   get a different one here:  github.com/paulirish/html5-boilerplate-server-configs
+
+file.serverconfig           = .htaccess
+
+#
+# Files not to be copied over by the script to the publish directory
+#
+file.default.exclude        = .gitignore, .project, .settings, README.markdown, README.md, **/.git/**, **/.svn/**, ${dir.test}/**, ${dir.demo}/**, ${dir.intermediate}/**, ${dir.publish}/**, ${dir.build}/**, **/nbproject/**, *.komodoproject, **/.komodotools/**, **/dwsync.xml, **_notes, **/.hg/**, **/.idea/**
+# Declare the file.exclude property in your project.properties file if you want to exclude files / folders you have added
+# Note: you cannot declare an empty file.exclude property
+
+#
+# Bypass Optimization for these files
+#
+# file.default.js.bypass
+# If set, these files will not be optimized (minifications, concatinations, image optimizations will not be applied)
+# Note: you cannot declare an empty file.default.bypass property
+
+
+#
+# Root Stylesheet
+# this is the file that contains the @import directives
+#
+file.root.stylesheet    = style.css
+
+#
+# Default Stylesheet
+#
+file.default.stylesheets    = 
+
+#
+# Script Optimisation
+#
+# If set, concat libraries with main scripts file, producing single script file
+build.concat.scripts        = true
+
+
+#
+# Image Optimisation
+#
+images.strip.metadata       = true
+# Seting this to true will strip the metadata from all jpeg files.
+# YOU SHOULD ONLY DO THIS IF YOU OWN THE COPYRIGHT TO ALL THE IMAGES IN THE BUILD
+
+#
+# Bypass Optimization for these image files or folders
+#
+# images.default.bypass
+# If set, these images will not be optimized
+# Note: you cannot declare an empty images.default.bypass property
+
+
+# Build Info
+build.version.info          = buildinfo.properties
+build.scripts.dir           = ${dir.build}/build-scripts
+
+# Tools
+tool.yuicompressor          = yuicompressor-2.4.5.jar
+tool.htmlcompressor         = htmlcompressor-1.4.3.jar
+tool.csscompressor          = css-compressor/cli.php
+tool.rhino                  = rhino.jar
+tool.jslint                 = fulljslint.js
+tool.jshint                 = fulljshint.js
+tool.csslint                = csslint-rhino.js
+
+# Default Lint Utils Options
+tool.jshint.opts            = maxerr=25,eqeqeq=true
+tool.jslint.opts            = maxerr=25,evil=true,browser=true,eqeqeq=true,immed=true,newcap=true,nomen=true,es5=true,rhino=true,undef=true,white=false,devel=true
+tool.csslint.opts           = 

File design/build/config/manifest.appcache

+CACHE MANIFEST
+
+# version xxxxxxxxx
+
+CACHE:
+# html files
+
+
+# css files
+
+
+
+# js files
+
+
+
+FALLBACK:
+
+NETWORK:
+*

File design/build/config/project.properties

+# project.properties file defines overrides for default.properties
+
+# Explanation: This file should be created by each user as and when he or she needs to override particular values.
+# Consequently, it should not be placed under version control.
+
+
+# Stylesheets
+#
+# Note: Stylesheets will be concatenated in the order they are listed in the file.stylesheets property (i.e. the last
+# file listed will be at the end of the concatenated file), so it probably makes sense to have the main style.css file
+# as the first entry
+# Example:
+# file.stylesheets  = style.css, lightbox.css, plugin.css
+#
+file.stylesheets  =
+
+
+# Web Pages
+#
+# These are the pages (files) that will be served to users (.html, .php, .asp, etc). Files in this property will
+# be minified / optimised and have any stylesheet or javascript references updated to the minified examples
+#
+# The paths need to be relative
+#
+# Files can be added in a comma separated form
+file.pages        =
+
+
+# site manifest for offline
+# this is the name of the manifest file you declared in the <html> tag
+# Uncomment this line to enable appcache generation:
+# file.manifest    = manifest.appcache
+
+# Excluded files and dirs
+#
+# Add any files or directories you add to the project and do not want to be copied to the publish directory as a
+# comma separated list
+# These files are ignored in addition to the default ones specified in default.properties.
+file.exclude      =
+
+# Bypassed JavaScript files and dirs
+#
+# Add any files or folders within the mylibs directory that you want to be copied to the publish directory as a
+# comma separated list
+# These files will not be concatenated or minimized and will simply be copied over as is.
+# Note: you cannot declare an empty file.bypass property, it would exclude the entire mylibs folder
+# Example:
+# file.js.bypass = widgets.js, gadgets.js, gidgets.js
+# file.js.bypass = 
+
+
+# Specify an environment to build
+#
+# By Default, it builds a production environment
+# Set to dev if building a development environment
+# Set to test if building a test environment
+env               =
+
+#
+# Bypass Optimization for these image files or folders
+#
+# images.bypass
+# If set, these images will not be optimized
+# Note: you cannot declare an empty images.bypass property, it would exclude the entire img folder from being optimized
+
+# Directory Structure
+#
+# Override any directory paths specific to this project
+#
+# dir.publish
+# dir.js
+# dir.js.libs
+# dir.js.mylibs
+# dir.css
+# dir.images
+
+# Google App Engine Directory Structure
+#
+# Prevent "static/" being included in concated file paths.
+#
+# gae.css_dir = /css
+# gae.js_dir = /js
+
+# Override default JSHint Options (see http://jshint.com/ for description of options)
+#tool.jshint.opts = 
+
+# Override default JSLint Options (see http://www.jslint.com/lint.html for description of options)
+#tool.jslint.opts = 
+
+# Override default CSSLint Options (see http://csslint.net/about.html#settings for description of options)
+#tool.csslint.opts = 

File design/build/createproject.sh

+#!/usr/bin/env bash
+
+#Generate a new project from your HTML5 Boilerplate repo clone
+#by: Rick Waldron & Michael Cetrulo
+
+
+##first run
+# $ cd  html5-boilerplate/build
+# $ chmod +x createproject.sh && ./createproject.sh
+
+##usage
+# $ cd  html5-boilerplate/build
+# $ ./createproject.sh
+
+# find project root (also ensure script is ran from within repo)
+src=$(git rev-parse --show-toplevel) || {
+  echo "try running the script from within html5-boilerplate directories." >&2
+  exit 1
+}
+[[ -d $src ]] || {
+  echo "fatal: could not determine html5-boilerplate's root directory." >&2
+  echo "try updating git." >&2
+  exit 1
+}
+
+# get a name for new project
+while [[ -z $name ]]
+do
+    echo "To create a new html5-boilerplate project, enter a new directory name:"
+    read name || exit
+done
+dst=$src/../$name
+
+if [[ -d $dst ]]
+then
+    echo "$dst exists"
+else
+    #create new project
+    mkdir -- "$dst" || exit 1
+
+    #sucess message
+    echo "Created Directory: $dst"
+
+    cd -- "$src"
+    cp -vr -- css js img build test *.html *.xml *.txt *.png *.ico .htaccess "$dst"
+
+    #sucess message
+    echo "Created Project: $dst"
+fi
+

File design/build/runbuildscript.bat

+# This is for windows users only.
+# If you're on a mac or linux, just run `ant build` from this folder in Terminal
+
+set MYDIR=%~dp0
+ant build