Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.