Skip to content

Instantly share code, notes, and snippets.

@nowk
Created April 29, 2014 21:44
Show Gist options
  • Save nowk/544a83a8991c5025f823 to your computer and use it in GitHub Desktop.
Save nowk/544a83a8991c5025f823 to your computer and use it in GitHub Desktop.
Simple grunt build
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
dist: {
files: [{
expand: true,
cwd: './',
src: ['index.js'],
dest: 'dist'
}]
}
},
jshint: {
files: ['./index.js'],
options: {
globals: {
jQuery: false,
console: true,
module: true,
document: true
}
}
},
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('build', ['jshint', 'uglify']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment