Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Grunt

You're reading from   Learning Grunt Monitor and automate complex JavaScript tasks and processes by obtaining a practical understanding of Grunt

Arrow left icon
Product type Paperback
Published in Mar 2016
Publisher Packt
ISBN-13 9781785888809
Length 184 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Douglas Reynolds Douglas Reynolds
Author Profile Icon Douglas Reynolds
Douglas Reynolds
Arrow right icon
View More author details
Toc

Chapter 7. Advanced Grunt Concepts

In this chapter, we will look at an advanced Grunt concept—the creation and implementation of a custom task. In Chapter 6, Building the Sample Project we looked at how we can create custom tasks in Gruntfile.js; now, we will look at writing a task that will be implemented and used like any of the other tasks that we have been working with throughout the book. We will write a custom task that will reside in the tasks directory, create a configuration in Gruntfile.js, and load and register the custom task. For this plugin, a gzip task will be created to illustrate how you can build and implement your own tasks. You may find it very difficult to come up with a need that has not already been met with an existing plugin created to solve the same problem. Always search NPM for existing plugins. For the rare case that you are unable to find a plugin to meet your needs, this chapter will help you grasp the scope of what needs to be done.

The topic...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime