Published on April 09, 2014 by Toran Billups
The first step is to add grunt, grunt-cli and grunt-contrib-concat to your package.json file and npm install each of them.
The next step is to add a new file that will hold the configuration for our build process. For grunt this file is called literally Gruntfile.js
At the top of the script you need to load the concat task so we have access to it when we run our grunt command. Next we declare the concat task itself, providing both a list of assets to concatenate and finally a single file name for the combined output file. Then at the very bottom we simply register a task named "local" that will run the concat step we defined above.
The final step is to replace all the assets in index.html with our new output file.
If you already completed the npm install of grunt/grunt-cli/grunt-contrib-concat you should be able to add grunt to your path and type "grunt local". This command will generate a single js file named deps.min.js and put it in the dist folder. After you run the grunt command you can run the python script by typing "./bin/server" from the root of the project. This should host the static directory so you can view the running app at localhost:3000
If you want to follow along on github, this repository has a commit for each part in the series