Search icon CANCEL
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

Discussing package.json and gruntfile.js

Grunt projects have two important files that are required in order to define and configure Grunt: package.json and gruntfile.js. The package.json is a JSON file that is normally located at the root of a project using NPM to manage dependencies, and gruntfile.js is a JavaScript file that also exists in the project root directory. The combination of these two files provides the information about the project and configuration of the packages used in the project that are needed in order to create an automated build system. We will look at each in more detail before beginning to configure sample_project.

The package.json file

As mentioned, package.json is a JSON file that defines data about our project, also known as project metadata. In this file, as we have seen throughout our plugin installation process, we have registered our project's plugins in the devDependencies section.

The metadata that package.json defines, in addition to the project dependencies...

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 €18.99/month. Cancel anytime