Building Your Own Ember App Kit Lite Part 5

Published April 12, 2014 by Toran Billups

In the previous post we migrated from globals to modules using the es6 module transpiler.

At this point the Grunt configuration has grown, but we are missing a critical part of the build process. To help find errors/mistakes quickly during the development process, we need to add JSHint

The first step is to install the npm module itself after adding it to the package.json file.

Next we need to load the npm module at the top of our Gruntfile.js and add the jshint task with a few options. The first tells jshint what files to look at, and in this case we want any js file under the app directory. The esnext option is to tell jshint we are using ES6 (to ignore the import statements).

You might also notice that we make jshint the first step of our grunt build. I prefer this because it will fail fast and usually if I'm missing a semicolon it's best to find this before you precompile your handlebars templates/transpile/etc.

Now that our grunt build includes jshint we can move onto watch + live reload!

If you want to follow along on github, this repository has a commit for each part in the series


Buy Me a Coffee

Twitter / Github / Email