es6rocks/harmonic — pull request #98 by UltCombo (2014-12-24 09:49:23+00:00)
Title: Rewrite unit tests to not change the process's CWD, replace Traceur with 6to5, replace Grunt with gulp

Closes #86
Closes #87
Paving the way for #96 (allow APIs to receive a sitePath argument)

@jaydson this PR is not ready for merging yet, but feel free to take a look if you have time.

I've coded this while half asleep, so I'll perform a self-review tomorrow if I have time as well.

The main benefit of the Grunt -> gulp switch here is that gulp is imperative, providing lower-level control. I've prepared the gulpfile's watch task taking in consideration projects which take a long time to build/test (improving the test time is in my TODO list, but given Harmonic's nature, odds are the tests will still take a considerable amount of time even after being properly refactored).

More specifically, watch task works in "batch" mode -- that is, if you edit/create/remove one or more files while a build/test is running, it will wait until the test is finished and then process all the files that changed while the test was running, thus generating an incremental build and running tests again.

If anyone has trouble reading the gulpfile, take a look at the (simplified) [stream flow diagram](https://github.com/es6rocks/slush-es6/issues/5#issue-52701608).

## TODO:
- [ ] build task's copySrc is not copying files which have been negated by globs before being re-included
- [ ] check why build task takes so long to finish when passing an absolute sitePath argument and CWD != sitePath (the `harmonic build` in the unit test takes about 11 seconds to finish in Windows) -- @jaydson mind checking how long it takes for `npm test` to conclude in your computer?