Skip to content

Instantly share code, notes, and snippets.

@nathan-isaac
Created September 25, 2013 18:14
Show Gist options
  • Save nathan-isaac/6703687 to your computer and use it in GitHub Desktop.
Save nathan-isaac/6703687 to your computer and use it in GitHub Desktop.
Adding Grunt to your project.

npm install -g grunt-cli

npm install

npm install grunt-contrib-concat --save-dev

module.exports = function(grunt) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
// 2. Configuration for concatinating files goes here.
}
});
// 3. Where we tell Grunt we plan to use this plug-in.
grunt.loadNpmTasks('grunt-contrib-concat');
// 4. Where we tell Grunt what to do when we type "grunt" into the terminal.
grunt.registerTask('default', ['concat']);
};
{
"name": "example-project",
"version": "0.1.0",
"devDependencies": {
"grunt": "~0.4.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment