Question: Write a grunt file to validate js files using jshint, uglify the js files, minify html files, start the webserver and watch the webserver. Validate
Write a grunt file to validate js files using jshint, uglify the js files, minify html files, start the webserver and watch the webserver.
- Validate js files with jshint.
- Uglify the js files, place the uglified files inside "dest/js" folder and the file name should not be changed.
- The source file is located in "src/js".
- Minify the html files in "src" folder and place it inside "dest/src" folder with the same file name.
- After html minification, setup and run the webserver.
- Assign the option keepalive to be false.
- Run the watch task to watch the webserver.
- Use the IDE terminal to install plugins.
- Use official grunt plugins only.
Step by Step Solution
3.52 Rating (155 Votes )
There are 3 Steps involved in it
Heres a Gruntfile that should do what youre looking for moduleexports functiongrunt Load the plugins ... View full answer
Get step-by-step solutions from verified subject matter experts
