generator-gulp-angular
generator-gulp-angular copied to clipboard
Undefined global constant: Update documentation to reflect jshint configuration at the top of index.constants.js
After spending lots of time wondering why my global constants result in JSHint undefined errors, I just realized that the comment at the top of index.constants.js is meant to be modified, in addition to adding a new constant to the constants declaration chain.
The jshint error will throw new users off. I kept thinking that was the problem with my code when I could be looking at something else. Including how this works in the documentation will help. I could do a PR, but I really don't know what is happening behind the scenes. My explanation could be wrong.
This example adds the firebase constant to the app. Note the 'firebase:false" declaration added to the comment on the first line:
/* global malarkey:false, moment:false, firebase:false */
(function() {
'use strict';
angular
.module('gulpAngularApp')
.constant('malarkey', malarkey)
.constant('firebase', firebase)
.constant('moment', moment);
})();