Last active
August 29, 2015 13:56
-
-
Save gergelyke/9051146 to your computer and use it in GitHub Desktop.
Gruntfile to concat & uglify
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
'use strict'; | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
concat: { | |
dist: { | |
src: ['main.js', 'ctrl1.js'], //source files goes here | |
dest: 'build/lib.js' //concatenated file goes here | |
} | |
}, | |
uglify: { | |
options: { | |
compress: { | |
dead_code: true | |
}, | |
wrap: true, | |
sourceMap: true | |
}, | |
dist: { | |
src: '<%= concat.dist.dest %>', | |
dest: 'build/lib.min.js', | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.registerTask('build', ['concat', 'uglify']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment