This commit fixes several linting errors found in the build system. It also normalizes several conventions within the system.
The most important fix was to move all var statements to the top of closures. var statements within loops in the StreamLoader.executeCustomOutput method were causing issues on builds with longer asset streams; for example, a build with ~150 font files was failing to copy all files properly to the dest folder. This issue was not reported previously.
fixes
moves all var statements to tops of closures
adds missing semicolon to line 17 of the img.js driver
normalizations
Changes lint options in all file headers
adds 'use strict' declaration to tasks.js (present in all other files)
changes all token capitalization to better match JavaScript conventions
notes
var declarations: in addition to moving var statements to tops of closures, used single statement with comma separated, alphabetized variables. Allowed separate declarations for large code blocks such as object shorthand and functions.
linting options: when using jshint, linter will use strict mode rules, and will treat CommonJS tokens (require, module, etc) as globals.
capitalization: normalized to convention: all tokens use camel case with initial lowercase except constructors, which have initial uppercase.
(From #161, previously opened by @stoff)
This commit fixes several linting errors found in the build system. It also normalizes several conventions within the system.
The most important fix was to move all var statements to the top of closures. var statements within loops in the StreamLoader.executeCustomOutput method were causing issues on builds with longer asset streams; for example, a build with ~150 font files was failing to copy all files properly to the dest folder. This issue was not reported previously.
fixes
normalizations
notes
var declarations: in addition to moving var statements to tops of closures, used single statement with comma separated, alphabetized variables. Allowed separate declarations for large code blocks such as object shorthand and functions. linting options: when using jshint, linter will use strict mode rules, and will treat CommonJS tokens (require, module, etc) as globals. capitalization: normalized to convention: all tokens use camel case with initial lowercase except constructors, which have initial uppercase.