How to do it...

  1. To begin, open Bash or a similar program and navigate to chapter9/start/grunt. Add the plugin by running the following command:
npm install grunt-strip-css-comments --save-dev
  1. Open your Gruntfile.js and add another Grunt task by inserting the following code on line 56:
 stripCssComments: { dist: { files: { '../app/www/css/main.css': '../app/www/css/main.css' } } },
  1. On line 74 of your Gruntfile.js, add the following line of code:
grunt.loadNpmTasks('grunt-strip-css-comments');
  1. Navigate your console to chapter9/start/grunt and run the following command:
grunt stripCssComments
  1. Preview the file size and contents of main.scss.

Get Bootstrap 4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.