Created
April 13, 2015 18:25
-
-
Save cbourdage/8b1c69c245b98cfe9570 to your computer and use it in GitHub Desktop.
sample grunt configuration for js combining/minification
This file contains 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
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
clean: { | |
js: [ | |
'js/gorilla/deploy/*.js', | |
'js/gorilla/plugins.js' | |
] | |
}, | |
// Concatenate gorilla lib files into a single plugins file | |
concat: { | |
options: { | |
separator: "\n\n" | |
}, | |
build: { | |
src: [ | |
'js/gorilla/*.js', | |
'!js/gorilla/plugins.js', | |
'!js/gorilla/utilities.js' | |
], | |
dest: 'js/gorilla/plugins.js' | |
}, | |
deploy: { | |
src: [ | |
'js/gorilla/deploy/*.js' | |
], | |
dest: 'js/gorilla/plugins.js' | |
} | |
}, | |
// Minifies our javascript files | |
uglify: { | |
options: { | |
banner: '/*! <%=pkg.name %> - v<%=pkg.version %> -' + '<%=grunt.template.today("yyyy-mm-dd") %> */' + "\n", | |
mangle: true, | |
compress: false | |
/*compress: { | |
drop_console: true | |
}*/ | |
}, | |
deploy: { | |
files: [{ | |
expand: true, | |
cwd: 'js/gorilla', | |
src: [ | |
'*.js', | |
'!utilities.js' | |
], | |
dest: 'js/gorilla/deploy' | |
}] | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment