Grunt is a task-based command line build tool for JavaScript projects. Grunt and its plugins are installed and managed via npm, the Node.js package manager.
Your job is to create three grunt tasks responsible for:
- validate files with JSHint,
- run unit tests,
- inject bower plugins directly into the
index.htmlfile.
At the beginning application is in not working state.
After installing appropriate grunt plugins, configure Gruntfile.part.js (as it was config passed to grunt.initConfig(config)) file and create three tasks:
-
wiredep task:
- should inject bower dependencies directly into the
index.htmlfile, - for the
bootstrapcomponent inject only the CSS part
- should inject bower dependencies directly into the
-
jshint task:
- should use
.jshintrcfile - should specify all .js files from:
appfolder,testfolder and its subfolders to linted, moreoverbower componentsshould be excluded from checking - should detect errors and potential problems in .js files and create
jshint.xmlreport intargetfolder (use built-in checkstyle reporter),
- should use
-
karma task:
- should use
karma.conf.jsconfiguration file - should contain
unitsubtask which runs all tests
- should use
yarn install
bower install
grunt serve
To run e2e tests in development mode:
grunt test:e2e
Good luck!