NodeJS, Bower, Grunt
NDS Sprint 18, NDS Sprint 19
The tasks we should implement, in order, are as follows:
- jshint / csslint: Display syntax errors / warnings from JS / CSS
concat: Concatenate all JS / CSS to a single fileuglify does this as well
- uglify / cssmin: Minify / compress all JS / CSS files
- imagemin: Compress all locally-stored images
karma/protractor: Run unit/integration tests on the GUI against the mock server(see NDS-725)
http-serverexpress (with different modes? i.e. production vs. dev - see NDS-727)
This story is complete when the Gruntfile.js in the ndslabs GUI source is filled out to automate some or all of the above tasks. At the very least, jshint, uglify, cssmin, imagemin and
concat should be present.
More tasks can be added at any time if we decide that there is anything else we might find helpful.
Only helpful if we do all of them:
- swagger / swagger-server: Generate a REST client and mock server (for testing or backend-less development) from a swagger api spec
- connect / watch: start a test server to develop against (may require changes to apiserver CORS) and automatically refresh the UI / run unit tests when files change on disk
- istanbul: report code coverage of the tests run - seems to require running a proxy server, which may cause issues with CORS
jsdoc: Generate HTML pages containing documentation from comments in the source (javadoc for js)(minimal is preferred to optimal) browserify: resolve nodejs modules within JS source(would require several changes - see NDS-229)
- moustache: templating engine that can ease things like versioning
- cachebuster: append magic strings to index.html to prevent caching
- Other tasks that may need exploration:
- precompile js templates
- generate / apply certs?
- the order in which these tasks will need to run to function properly