connectivedx / Phoenix

http://connectivedx.github.io/Phoenix/
33 stars 5 forks source link

Bug/build system fixes #165

Closed elseloop closed 8 years ago

elseloop commented 8 years ago

(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

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.