Posted on February 4th, 2015
This may sound like a lot but it allowed me to get a base project that could:
- Run tests as soon as my files changes (using PhantomJS to not open a browser).
- Compile all my JS files into a single file to improve download/cache.
- Minify that file for production usage.
- Provide me with coverage information (and a badge for the project thanks to code climate).
- Provide me with dependency tracking (thanks to David).
- Run tests in the cloud against multiple browsers and multiple versions of browsers and operating systems thanks to Saucelabs (and a nice badge showing me it all worked).
- Provide me with a Continuous Delivery (actually Continuous Deployment) thanks to Snap-CI.
Having all of that, my workflow is pretty simple:
- I start my test watcher with "grunt watch"
- Make the changes I want in my tests
- Get a nice failure notification (if I know what I’m doing)
- Fix my production code
- Get a nice success notification (if I did it write)
- Repeat 3 to 5 as many times as needed
- Commit and push the changes when happy
- Get a nice RSS feed (thanks to Snap) telling me everything was fine (or a failure email when I break the build) and my project's Github page has the latest valid (passed the build) version of the JS script minified available.