Merge dev #29

merged 77 commits into from Apr 16, 2012


None yet

1 participant


It's probably the first time I'm doing a pull request from within the same repo.

Doing so mainly to notify you with the merge of the work that have been
done over the last month.

A lot of stuff (see according commit list... I'm wondering if I should
rebase all that into a single commit..). A lot of documentation to.

  • rewrote to use grunt 0.3.x
  • packaged as a grunt plugin
  • added an init task and the grunt init template for creating a new h5bp project (files are downloaded from master repo the first time the task runs). Should also generate proper gruntfile for direct use of the build script.
  • Latest changes include an html minfication (via html-minifier) and an img optimization task (via optipng / jpegtran)
  • plus a lot more

Tested on both windows and osx. I'm pretty sure there are still quite a few
glitches here and there but I'm finally ready to merge all of this in

cc @necolas

added some commits Mar 14, 2012
@mklabs dom - a start on dom-based build using jsdom
seems like a good starting point, doing most of the stuff outlined in

the only plugin (partially) implemented is link for now.

related to #1
@mklabs misc - udpate package.json, commit support dir, removed postinstall eae2865
@mklabs lib - added a lib entry with a single `load` method
load is meant to be used in one of the task files loaded by
grunt, either it is grunt.js file or some other task file.


A list of task name can be supplied to load specific task(s).

    require('node-build-script').load('dom', 'css');
@mklabs dom - added basic documentation and config check for `dom` prop 8d64c80
@mklabs dom - a way to setup global defaults for plugins
options.dir may be used to setup the relative root path for path
@mklabs dom - do not handle external paths in link plugin 4014e13
@mklabs css - add r.js to handle css import inlines 0f2d60b
@mklabs docs - doc for link plugin 7d0210d
@mklabs test - add dom-test/ and runner for basic assertion testing 87594e2
@mklabs test - add cucumber features scaffold ef99f70
@mklabs test - rework the setup to be based on cucumber/zombie, grunt spawned 9011491
@mklabs test - cleanup and remove the test/ dir b320257
@mklabs misc - mv plugins/ -> libs/ 9efb87a
@mklabs test - added submodule, pretest and working tests env
* submodule to h5bp/html5-boilerplate to test/h5bp
* pretest runs git submodule update --init
* cp -r test/h5bp/* .test/

This closes #15
@mklabs Given I am on the index.html.test page Then I should see style.min.css
that's.. so.. ☺
@mklabs Init the udpate to grunt 0.3.x api, minor changes + script domplugin …
…first impl

* moving tasks into tasks "subsets"
* update of load method, a bit hacky right now
* minor docs updates
* moving jquery from support to tasks/dom/support
* minor changes to link domplugin
* added script plugin, with basic concat / min / replace
* plus some minor changes to runner (previously tasks/dom)
@mklabs minor changes to plugins options (cwd, dir, out) and file html output
* added cwd for base dir to work from
* out: assets optimized output gets resolve under this dir
* html file output at the same location (will most likely work with a
  pre-copy task)
@mklabs test - reworked the runner, setting up spawned grunt
* commands run serially
* tests fail or pass depending on grunt's exit code
@mklabs gruntfile 0.3.x updates 0a6e4a2
@mklabs completed the 0.3.x api changes
* some tasks still needs staging and output config special handling
  (css, js, min, rev)
* probably temporary, added plugin to ease the process of porting
  the tasks. Loaded through VM context. This eventually also allows
  tasks to be written in CoffeeScript.
* updated the tests
@mklabs serve - reworked the serve task, using new grunt api 12cb29e
@mklabs connect - same rework as the serve task
register helper connect and basic task
@mklabs rev - reworked the rev task, updated gruntfile
* register a simple task
* with two helpers: hash / md5
@mklabs mkdirs - rewrote the mkdirs task to use ncp and minimatch
* ignores are glob paterns
* output / staging dirs filtered too, automatically added to the list
  of ignores
* cleanup
@mklabs css - use rjs to optimize and handle @import statements c0142d6
@mklabs usemin - update the usemin task to use the new grunt api 85e4801
@mklabs clenup - removed h5bp.load in favor of grunt.loadTasks e7b229b
@mklabs misc - slighly changed the intro task to pull in message from config d0cfdc1
@mklabs utils - added utility package, merged into grunt.utils
flatiron/utile inspired.

Mainly defining wrappers to a set of utility modules, as lazy-loaded
@mklabs added scripts/ dir, dealing with conditional install of jsdom
windows install issue otherwise

also, the dom task is loaded only for environments that support it
@mklabs test - tweak the test runner to be usable on windows e9b6644
@mklabs update the misc tasks to use utils, and update the gruntfile(s) 130a581
@mklabs docs b3947a3
@mklabs update grunt to 0.3.7, udpate binary 7c7559a
@mklabs more docs 37b5aac
@mklabs docs, update links e3a6849
@mklabs usemin - reworked the usemin task to be a little bit clever
original idea from @necolas in:

usemin task is now using "directives", some special kind of html comments
surrounding the part of html we want to replace.

There is no need for JSDOM for this, this is plain regexp (JSDOM required
for data-build attributes).


    <!-- build:css css/site.css -->
    <link rel="stylesheet" href="css/style.css">
    <!-- endbuild -->

Results in:

    <link rel="stylesheet" href="css/site.css">

We even have tests for that :) (node test/tasks/usemin)

Relates to #13
@mklabs update submodule b47de64
@mklabs tests - better test workflow 1444e7e
@mklabs test - udpate expected, submodule update c23ea96
@mklabs usemin - have the switch to revved file done with surrouding comments
This closes #13
@mklabs a proper layout / style for docs, scripts to generate / serve + devDeps
style is the coming from repo, borrowing recent
docs style rework from @nimbupani
@mklabs update the docs on test, cleanup test/ folder
cucumber features needs a little more work
@mklabs add docs for new usemin task 0791c87
@mklabs docs - update home, add overview and plugin install/loading info 3abb99d
@mklabs add load task, necessary to load tasks in subdirectories e9ad7a0
@mklabs update the deps bd3bdaa
@mklabs minor tweaks, some cleanup 99111fc
@mklabs removed docs, now in wiki and separate branch d3c0ca4
@mklabs custom help output
with h5bp help, grunt help still available as h5bp --help as usual
@mklabs handel --version 184b06f
@mklabs better mkdirs task, reading .gitignore file to avoid file copy
complements the exclude property of config

this doensn't work recursively, eg. .gitignore files in subdfolders are
not handled.
@mklabs added an help task
with mapping to pages in wiki, may view them using man or default
@mklabs update submodule, move loadNpmTasks to the help task file abe4656
@mklabs init task. closes #19 f2f99f8
@mklabs minor tweaks to our custom binary 43eb6fb
@mklabs move the utils augment at appropriate place, cannot be in gruntfile
as the gruntfile may vary from to project, more convenient this way
@mklabs update the tarball url in init templates
to use github's nodeload directly, works slightly better in proxy
@mklabs A few fixes for the init template
some related to windows linefeed things
@mklabs docs submodule update 0c6efca
@mklabs added htmlclean task, build targets and removed tasks' subdirs
* added htmlclean task, running html through html-minifier. Closes #23

* plugin config/tasks loading now done in tasks/h5bp.js

* Added few alias as build targets. Closes #21

the grunt.js file in repo's root is there only for assisting devlopping
the project. This ensures the tasks and default configuration is loaded
globally, as a new gruntfile might override this per project. Closes #22

* pass config in a slightly different way to grunt-help plugin

we need this to remain the same, and to not rely on grunt.config('help')
as the entire config may be re-init in some other gruntfile.

* moved all tasks files into tasks/*.js (no more subdir, except the init one)
@mklabs make the tests pass e240865
@mklabs better intermediate/, publish/ dir handling
relates to #26
@mklabs add some debugging helpers to project gruntfile 7c7caed
@mklabs slightly reworked the build targets to be a single task
* pre/post series of tasks runs automatically
  * pre: intro clean mkdirs
  * post: copy time

to run: grunt build:<target>

targets: default, text, buildkit, basics, minify

This closes #26
@mklabs update the tests, add few img fixture files e14c1c9
@mklabs add img optimization task, optipng / jpetran
relates to #25, have to test this on windows and include both .exe binaries
@mklabs lint fail f3d4bc2
@mklabs fallback to local binaries for windows system
* added optipng-8d and optipng-0.7.1 into vendor/
* necessary change to img task code to work on windows
* to test back on posix

This closes #25
@mklabs make sure $PATH is setup during tests
This ensures "which" package works appropriately when grunt is run via
sub process
@mklabs reworked serve and html tasks 12712f7
@mklabs pre-commit hook 39a80c0
@mklabs update init template d911203
@mklabs a docs task
plus the internal scripts/docs tool and genedocs grunt task to generate

the docs task (provided in the plugin, or via h5bp docs) will start a
server on top of docs/ directory and open a browser on generated
@mklabs update readme and help output 4085447
@mklabs commit generated doc, this may make the docs task working 6335d10
@mklabs 0.1.0 b07331f
@mklabs mklabs merged commit a9fa522 into master Apr 16, 2012
This was referenced Apr 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment