Skip to content

Instantly share code, notes, and snippets.

@gijsroge
Created July 4, 2014 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gijsroge/52d2e9827851a9317102 to your computer and use it in GitHub Desktop.
Save gijsroge/52d2e9827851a9317102 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
autoprefixer: {
dist: {
files: [{
expand: true,
cwd: 'css/',
src: 'build/{,*/}*.css',
dest: 'build/'
}]
}
},
uglify: {
compressjs: {
options: {
mangle: true,
compress: true,
beautify: false,
sourcemap: false,
preserveComments: false,
compress:{
drop_console: true
}
},
files: {
'js/build/output.min.js': ['js/src/*.js']
}
}
},
cssmin: {
minify: {
files: {
'css/build/output.min.css': ['css/src/*.css']
}
}
}
});
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('build', ['cssmin:minify', 'autoprefixer', 'uglify:compressjs']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment