Skip to content

Commit e8f41f8

Browse files
committed
initial import of 1.0 bp
1 parent 6d321ce commit e8f41f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+259
-4801
lines changed

.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ FileETag None
368368

369369
# If you're not using the build script to manage your filename version revving,
370370
# you might want to consider enabling this, which will route requests for
371-
# /css/all.20110203.css to /res/all.css
371+
# /css/style.20110203.css to /css/style.css
372372

373373
# To understand why this is important and a better idea than all.css?v1231,
374374
# read: github.com/paulirish/html5-boilerplate/wiki/Version-Control-with-Cachebusting

404.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
body { text-align: center;}
55
h1 { font-size: 50px; text-align: center }
66
span[frown] { transform: rotate(90deg); display:inline-block; color: #bbb; }
7-
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); }
7+
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); }
88
::-moz-selection{ background:#FF5E99; color:#fff; }
99
::selection { background:#FF5E99; color:#fff; }
1010
article {display:block; text-align: left; width: 500px; margin: 0 auto; }
@@ -25,7 +25,7 @@ <h1>Not found <span frown>:(</span></h1>
2525
</div>
2626

2727
<script>
28-
var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),
28+
var GOOG_FIXURL_LANG = (navigator.language || "").slice(0,2),
2929
GOOG_FIXURL_SITE = location.host;
3030
</script>
3131
<script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>

build/build.xml

Lines changed: 76 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,14 @@
245245
<target name="-buildkit.dev"
246246
depends="-rev,
247247
-clean,
248-
-copy,
248+
-prodcopy,
249249
-imagespng,
250250
-imagesjpg"/>
251251

252252
<target name="-buildkit.test"
253253
depends="-rev,
254254
-clean,
255-
-copy,
255+
-prodcopy,
256256
-usemin,
257257
-js.all.minify,
258258
-js.main.concat,
@@ -268,7 +268,7 @@
268268
<target name="-buildkit.production"
269269
depends="-rev,
270270
-clean,
271-
-copy,
271+
-prodcopy,
272272
-usemin,
273273
-js.all.minify,
274274
-js.main.concat,
@@ -286,14 +286,14 @@
286286
<target name="-build.dev"
287287
depends="-rev,
288288
-clean,
289-
-copy,
289+
-prodcopy,
290290
-imagespng,
291291
-imagesjpg"/>
292292

293293
<target name="-build.test"
294294
depends="-rev,
295295
-clean,
296-
-copy,
296+
-prodcopy,
297297
-usemin,
298298
-js.all.minify,
299299
-js.main.concat,
@@ -309,7 +309,7 @@
309309
<target name="-build.production"
310310
depends="-rev,
311311
-clean,
312-
-copy,
312+
-prodcopy,
313313
-usemin,
314314
-js.all.minify,
315315
-js.main.concat,
@@ -327,14 +327,14 @@
327327
<target name="-minify.dev"
328328
depends="-rev,
329329
-clean,
330-
-copy,
330+
-prodcopy,
331331
-imagespng,
332332
-imagesjpg"/>
333333

334334
<target name="-minify.test"
335335
depends="-rev,
336336
-clean,
337-
-copy,
337+
-prodcopy,
338338
-usemin,
339339
-js.all.minify,
340340
-js.main.concat,
@@ -350,7 +350,7 @@
350350
<target name="-minify.production"
351351
depends="-rev,
352352
-clean,
353-
-copy,
353+
-prodcopy,
354354
-usemin,
355355
-js.all.minify,
356356
-js.main.concat,
@@ -384,6 +384,20 @@
384384
<target name="-rev" description="(PRIVATE) Increase the current build number by one and set build date">
385385
<!-- This is a private target -->
386386

387+
<echo message="====================================================================="/>
388+
<echo message="Welcome to the HTML5 Boilerplate Build Script!"/>
389+
<echo message=" "/>
390+
<echo message="We're going to get your site all ship-shape and ready for prime time."/>
391+
<echo message=" "/>
392+
<echo message="This should take somewhere between 15 seconds and a few minutes,"/>
393+
<echo message="mostly depending on how many images we're going to compress."/>
394+
<echo message=" "/>
395+
<echo message="Feel free to come back or stay here and follow along."/>
396+
<echo message="====================================================================="/>
397+
<echo message=" "/>
398+
<echo message=" "/>
399+
400+
387401
<echo message="Increasing the build number..."/>
388402
<propertyfile file="./${dir.build}/config/${build.version.info}" comment="Build Information File - DO NOT CHANGE">
389403
<entry key="build.number" type="int" default="0000" operation="+" pattern="0000"/>
@@ -409,6 +423,22 @@
409423
<copy todir="./${dir.publish}">
410424
<fileset dir="${dir.source}/" excludes="${excluded-files}"/>
411425
</copy>
426+
427+
<echo message="A copy of all non-dev files are now in: ./${dir.publish}."/>
428+
</target>
429+
430+
<target name="-prodcopy" depends="-load-build-info">
431+
<!-- This is a private target -->
432+
433+
<echo message="Copying over new files..."/>
434+
<!-- combine the 2 exclude properties -->
435+
<var name="prod-excluded-files" value="${file.default.exclude}, ${file.jpg.exclude}, ${file.exclude}"/>
436+
437+
<copy todir="./${dir.publish}">
438+
<fileset dir="${dir.source}/" excludes="${prod-excluded-files}"/>
439+
</copy>
440+
441+
<echo message="A copy of all non-dev files are now in: ./${dir.publish}."/>
412442
</target>
413443

414444

@@ -538,20 +568,20 @@
538568
<echo message="Switching to minified js files..."/>
539569

540570
<!-- switch from a regular jquery to minified -->
541-
<replaceregexp match="jquery-(\d|\d(\.\d)+)\.js" replace="jquery-\1.min.js" flags="">
571+
<replaceregexp match="jquery-(\d|\d(\.\d)+)\.js" replace="jquery-\1.min.js" flags="g">
542572
<fileset dir="./${dir.publish}" includes="${page-files}"/>
543573
</replaceregexp>
544574
<!-- switch any google CDN reference to minified -->
545-
<replaceregexp match="(\d|\d(\.\d)+)\/jquery\.js" replace="\1/jquery.min.js" flags="">
575+
<replaceregexp match="(\d|\d(\.\d)+)\/jquery\.js" replace="\1/jquery.min.js" flags="g">
546576
<fileset dir="./${dir.publish}" includes="${page-files}"/>
547577
</replaceregexp>
548578

549-
<echo>kill off those versioning flags: ?v=2</echo>
550-
<replaceregexp match='\?v=\d+">' replace='">' flags="">
579+
<echo>Kill off those versioning flags: ?v=2</echo>
580+
<replaceregexp match='\?v=\d+">' replace='">' flags="g">
551581
<fileset dir="./${dir.publish}" includes="${page-files}"/>
552582
</replaceregexp>
553583

554-
<echo>remove favicon reference if it is pointing to the root</echo>
584+
<echo>Remove favicon.ico reference if it is pointing to the root</echo>
555585
<replaceregexp match="&lt;link rel=&quot;shortcut icon&quot; href=&quot;/favicon\.ico&quot;&gt;" replace="">
556586
<fileset dir="./${dir.publish}" includes="${page-files}"/>
557587
</replaceregexp>
@@ -564,7 +594,7 @@
564594

565595

566596
<target name="-html" depends="-load-build-info" description="(PRIVATE) Very basic clean up of the HTML">
567-
<echo message="Clean up the html..."/>
597+
<echo message="Update the HTML to reference our concatenated script file: scripts-${build.number}.min.js"/>
568598
<!-- style.css replacement handled as a replacetoken above -->
569599
<replaceregexp match="&lt;!-- scripts concatenated [\d\w\s\W]*?!-- end ((scripts)|(concatenated and minified scripts))--&gt;" replace="&lt;script src='${dir.js}/scripts-${build.number}.min.js\'&gt;&lt;/script&gt;" flags="m">
570600
<fileset dir="./${dir.publish}" includes="${page-files}"/>
@@ -574,6 +604,10 @@
574604

575605

576606
<target name="-htmlclean">
607+
<echo message="Run htmlcompressor on the HTML"/>
608+
<echo message=" - maintaining whitespace"/>
609+
<echo message=" - removing html comments"/>
610+
<echo message=" - compressing inline style/script tag contents"/>
577611
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
578612
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
579613
<arg value="-jar"/>
@@ -592,6 +626,10 @@
592626

593627

594628
<target name="-htmlbuildkit">
629+
<echo message="Run htmlcompressor on the HTML"/>
630+
<echo message=" - maintaining whitespace"/>
631+
<echo message=" - retain html comments"/>
632+
<echo message=" - compressing inline style/script tag contents"/>
595633
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
596634
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
597635
<arg value="-jar"/>
@@ -610,6 +648,10 @@
610648

611649

612650
<target name="-htmlcompress">
651+
<echo message="Run htmlcompressor on the HTML"/>
652+
<echo message=" - removing unnecessary whitespace"/>
653+
<echo message=" - removing html comments"/>
654+
<echo message=" - compressing inline style/script tag contents"/>
613655
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
614656
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
615657
<arg value="-jar"/>
@@ -627,36 +669,44 @@
627669

628670

629671
<target name="-serverconfig" description="(PRIVATE) Upgrades expires headers">
630-
<echo message="Upgrading expires header timeouts for js/css"/>
672+
<echo message="Upgrading expires header timeouts for js/css to 1yr..."/>
631673
<replace file="./${dir.publish}/${file.serverconfig}" token="access plus 2 months" value="access plus 1 year"/>
632674
</target>
633675

634676

635677
<!-- CSS -->
636678
<target name="-css" depends="-load-build-info" description="Concatenates and Minifies any stylesheets listed in the file.stylesheets property">
637-
<echo message="Minifying css..."/>
679+
<echo message="Concatenating css..."/>
638680

639681
<concat destfile="./${dir.publish}/${dir.css}/style-${build.number}.css">
640682
<filelist dir="./${dir.publish}/${dir.css}" files="${stylesheet-files}"/>
641683
</concat>
642-
<apply executable="php" parallel="false">
684+
685+
<echo message="Minifying css..."/>
686+
687+
<apply executable="java" parallel="false">
643688
<fileset dir="./${dir.publish}/${dir.css}/" includes="style-${build.number}.css"/>
644-
<arg line="-f"/>
645-
<arg path="./${dir.build.tools}/${tool.csscompressor}"/>
689+
<arg line="-jar"/>
690+
<arg path="./${dir.build.tools}/${tool.yuicompressor}"/>
646691
<srcfile/>
647-
<redirector>
648-
<outputmapper type="glob" from="style-${build.number}.css" to="./${dir.publish}/${dir.css}/style-${build.number}.min.css"/>
649-
</redirector>
692+
<arg line="-o"/>
693+
<mapper type="glob" from="style-${build.number}.css" to="../${dir.publish}/${dir.css}/style-${build.number}.min.css"/>
694+
<targetfile/>
650695
</apply>
651696

697+
<echo message="Updating the HTML with the new css filename"/>
698+
652699
<replace token="style.css" value="style-${build.number}.min.css" dir="${dir.publish}" includes="${page-files}"/>
653700
</target>
654701

655702

656703
<!-- IMAGES -->
657704
<target name="-imagespng" description="(PRIVATE) Optimizes .png images using optipng">
658705
<echo message="Optimizing images..."/>
659-
<echo message="This part might take a while. But the rest of everything is already done."/>
706+
<echo message="This part might take a while. But everything else is already done."/>
707+
<echo message=" "/>
708+
709+
660710
<echo message="First, we run optipng on the .png files..."/>
661711

662712
<!-- osfamily=unix is actually true on OS X as well -->
@@ -720,7 +770,7 @@
720770
</and>
721771
<then>
722772
<apply executable="jpegtran" osfamily="unix">
723-
<fileset dir="./${dir.images}" includes="*.jpg"/>
773+
<fileset dir="${dir.source}/${dir.images}" includes="*.jpg"/>
724774
<arg value="-copy"/>
725775
<arg value="${strip-meta-tags}"/>
726776
<arg value="-optimize"/>
@@ -742,7 +792,7 @@
742792
</if>
743793

744794
<apply executable="tools/jpegtran.exe" osfamily="windows">
745-
<fileset dir="./${dir.images}" includes="*.jpg"/>
795+
<fileset dir="${dir.source}/${dir.images}" includes="*.jpg"/>
746796
<arg value="-copy"/>
747797
<arg value="${strip-meta-tags}"/>
748798
<arg value="-optimize"/>

build/config/build.properties

Lines changed: 0 additions & 3 deletions
This file was deleted.

build/config/default.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ file.serverconfig = .htaccess
4040
#
4141
# Files not to be copied over by the script to the publish directory
4242
#
43-
file.default.exclude = .gitignore, .project, .settings, README.markdown, README.md, ${dir.images}/*.jpg, **/.git/**, **/.svn/**, **/${dir.build}/**, **/${dir.test}/**, **/${dir.demo}/**
44-
43+
file.default.exclude = .gitignore, .project, .settings, README.markdown, README.md, **/.git/**, **/.svn/**, **/${dir.build}/**, **/${dir.test}/**, **/${dir.demo}/**
44+
file.jpg.exclude = ${dir.images}/*.jpg
4545
# Declare the file.exclude property in your project.properties file if you want to exclude files / folders you have added
4646
# Note: you cannot decalre an empty file.exclude property
4747

build/config/project.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# project.properties file defines overrides for default.properties
2+
23
# Explanation: This file should be created by each user as and when he or she needs to override particular values.
34
# Consequently, it should not be placed under version control.
45

build/createproject.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ else
3434
echo "Created Directory: $dst"
3535

3636
cd "$src"
37-
cp -vr css/ js/ img/ *.html *.xml *.txt *.png *.ico .htaccess "$dst"
37+
cp -vr css js img build test *.html *.xml *.txt *.png *.ico .htaccess "$dst"
3838

3939
#sucess message
4040
echo "Created Project: $dst"

0 commit comments

Comments
 (0)