Skip to content

Instantly share code, notes, and snippets.

@tomkr
Created February 6, 2014 19:17
Show Gist options
  • Save tomkr/8850776 to your computer and use it in GitHub Desktop.
Save tomkr/8850776 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
htmlmin: {
build: {
files: {
'build/index.html': 'index.html'
}
}
},
uglify: {
build: {
src: 'script.js',
dest: 'build/script.min.js'
}
},
cssmin: {
build: {
files: {
'build/styles.min.css': 'styles.css'
}
}
}
});
// Load the plugins we need
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
// Register a default task.
grunt.registerTask('default', ['htmlmin', 'uglify', 'cssmin']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment