The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Minifying your output with grunt-uglify

Minifying your output with grunt-uglify

2:23
For production we want to use minified javascript to reduce the payload that is sent from the server. This can easily be accomplished with grunt-uglify.
Watch this lesson now
Avatar
egghead.io

For production we want to use minified javascript to reduce the payload that is sent from the server. This can easily be accomplished with grunt-uglify.

Avatar
Cipriano

At the very end of this video you mentioned that the new minfied app.js has not been included into the index html. Where is this topic covered?? how is this automated?

In reply to egghead.io
Avatar
Matt

Ditto to Cipriano's question. Where is the video for the proper way to handle inclusion of minified files into the html file?

Avatar
Joel

There is no further lesson on this topic.

In reply to Matt
Avatar
Matt

I ended up going with a grunt tool called grunt-targethtml.

This was a painful process. There are a couple tools out there with what I consider cryptic documentation. It would be nice if the tutorials had direction for the step of inserting the new file(s) into the html page, as the author describes: "Take note though that we haven't included our new app.js in our index HTML, so it's not going to be used if we were to refresh the page. We'll get into that in a few more steps."

Avatar
jean-michel

I agree with Matt's point

The global picture is missing in this serie

  • which context would you use concat/uglify when uglify can do the job (as shown by John in an earlier post)?

  • a post showing how to connect the build version to have a functional site running would have been good especially if this is "painful"

Joel, egghead folks, what do you have to say?

Thanks

Jean-Michel

In reply to Matt
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?