In the previous section, we created and configured a Grunt file to compile our source files. In this section, we will look at extending our Grunt file to include options to prepare files for deployments to staging and production environments.
In this section, we will use a few Grunt NPM packages to help us prepare our deployments, including the following:
grunt-contrib-clean
: This removes files and directoriesgrunt-contrib-copy
: - This copies files and directoriesgrunt-text-replace
: This replaces text found within files
Install these NPM modules with the following commands:
> npm install grunt-contrib-clean --save-dev > npm install grunt-contrib-copy --save-dev > npm install grunt-text-replace --save-dev