Skip to content

Instantly share code, notes, and snippets.

@dmahipus
Last active August 29, 2015 14:05
Show Gist options
  • Save dmahipus/615d532793c84402a64f to your computer and use it in GitHub Desktop.
Save dmahipus/615d532793c84402a64f to your computer and use it in GitHub Desktop.
Basic Gruntfile with Concat
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'), //<---imports the JSON metadata stored in package.json
concat:{
dist: {
src: [
'js/libs/*.js', // Selects all JS in the libs folder
'js/main.js'
],
dest: 'js/build/production.js', //Output file after concatenating js files
}
}
});
// Load the plugin that provides the "concat" task.
grunt.loadNpmTasks('grunt-contrib-concat');
// Default task(s).
grunt.registerTask('default', ['concat']); //<--- adds "concat" to the default task
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment