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

1 Expert Approved Answer
Step: 1 Unlock

Heres a Gruntfile that should do what youre looking for moduleexports functiongrunt Load the plugins ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!