Last active
August 29, 2015 14:05
-
-
Save dmahipus/615d532793c84402a64f to your computer and use it in GitHub Desktop.
Basic Gruntfile with Concat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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