Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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
Sass and Compass Designer's Cookbook

You're reading from   Sass and Compass Designer's Cookbook Over 120 practical and easy-to-understand recipes that explain how to use Sass and Compass to write efficient, maintainable, and reusable CSS code for your web development projects

Arrow left icon
Product type Paperback
Published in Apr 2016
Publisher Packt
ISBN-13 9781783286935
Length 436 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Bass Jobsen Bass Jobsen
Author Profile Icon Bass Jobsen
Bass Jobsen
Stuart Robson Stuart Robson
Author Profile Icon Stuart Robson
Stuart Robson
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Getting Started with Sass FREE CHAPTER 2. Debugging Your Code 3. Variables, Mixins, and Functions 4. Nested Selectors and Modular CSS 5. Built-in Functions 6. Using Compass 7. Cross-Browser CSS3 Mixins 8. Advanced Sass Coding 9. Building Layouts with Sass 10. Building Grid-based Layouts with Susy and Sass 11. Foundation and Sass 12. Bootstrap and Sass 13. Meeting the Bourbon Family 14. Ruby on Rails and Sass 15. Building Mobile Apps 16. Setting up a Build Chain with Grunt Index

Utilizing the Gruntfile.js file

The Gruntfile.js file is the main configuration file for Grunt that handles all the tasks and task configurations. All the tasks and plugins are loaded using this file. In this recipe, you will create this file and will learn how to load Grunt plugins using it.

Getting ready

First, you need to install Node and Grunt, as described in the Installing Grunt recipe of this chapter. You will also have to install some Grunt plugins, as described in the Installing Grunt plugins recipe of this chapter.

How to do it...

Once you have installed Node and Grunt, follow these steps:

  1. In your Grunt project directory (the folder that contains the package.json file), create a new file, save it as Gruntfile.js, and add the following lines to it:
    module.exports = function(grunt) {
      grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
    
        //Add the Tasks configurations here.
      });
    // Define Tasks here
    };
  2. This is the simplest form of the Gruntfile.js file that...
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
Banner background image