Use Grunt Plug-ins
Without plug-ins, Grunt doesn’t do anything. You need plug-ins to automate all your build tasks. We will be using grunt-contrib-concat
, grunt-contrib-copy
, and grunt-contrib-jshint
(Grunt plug-ins with the grunt-contrib
prefix are written and maintained by the same people who write and maintain Grunt), which we already added to our package.json
and installed using npm install
. Now we need to load them into Grunt and configure them (see Listing 4.4).
module.exports = function(grunt) { grunt.initConfig({ concat: { release: { src: ['js/values.js', 'js/prompt.js'], dest: 'release/main.js' } }, copy: ...
Get Learning to Program 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.