Book Image

Grunt Cookbook

By : Jurie-Jan Botha
Book Image

Grunt Cookbook

By: Jurie-Jan Botha

Overview of this book

<p>A web application can quickly turn into a complex orchestration of many smaller components, each one requiring its own bit of maintenance. Grunt allows you to automate all the repetitive tasks required to get everything working together by using JavaScript, the most popular programming language.</p> <p>Grunt Cookbook offers a host of easy-to-follow recipes for automating repetitive tasks in your web application's development, management, and deployment processes. This book will introduce you to methods that can be used to automate basic processes and your favorite tools. By following the recipes, you will soon be comfortable using Grunt to perform a wide array of advanced tasks in a range of different scenarios.</p>
Table of Contents (17 chapters)
Grunt Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using a plugin


For the purpose of extending its core functionality, the Assemble framework provides a plugin system. There are currently only a handful of plugins available for Assemble, but having the plugin system available makes it easy for us to create and reuse extensions of our own, and perhaps even share them with the community.

Getting ready

In this recipe we'll be continuing working on the project from the Creating a template helper recipe. Be sure to refer to it if you are not yet familiar with it's content. Before we start we should also make sure that the site builder and server are running. If they aren't yet running they can be started using the grunt server command.

How to do it...

The following steps take us through making use of the assemble-middleware-sitemap plugin to generate a well-formed sitemap that can be used by web crawlers to navigate and index the site.

  1. First, we need to install the package that contains the assemble-middleware-sitemap plugin, and save it to our package...