O'Reilly logo

Web Development Recipes, 2nd Edition by Chris Johnson, Mike Weber, Chris Warren, Brian P. Hogan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recipe 44Automating Static Site Deployment with Grunt

Problem

Web developers working with static sites typically use tools like FTP to transfer web pages and associated assets into production. This practice works on a small scale, but as things get more complicated, manual processes break down. A file might be left out accidentally or copied to the wrong location. In addition, practices such as asset packaging—combining multiple JavaScript files into a single, compressed file—are required to improve download speed. We want to add this process easily to an automated deployment process. We need to develop a simple workflow that’s easy to maintain yet flexible enough to extend.

Ingredients

  • Node.js[139] and npm

  • Grunt[140]

  • Our virtual machine, created ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required