Last active
August 29, 2015 14:03
-
-
Save akatakritos/fd2d3e0cc851e48368e8 to your computer and use it in GitHub Desktop.
My default Gruntfile.js. Because I keep cobbling this together from various projects.
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
module.exports = function(grunt) { | |
'use strict'; | |
grunt.initConfig({ | |
concat: { | |
options: { | |
banner: "/*\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT DIRECTLY, INSTEAD BUILD WITH grunt. \n * \n */\n", | |
nonull: true | |
}, | |
master: { | |
src: [ | |
'src/**/*.js'], | |
dest: 'dist/master.js', | |
} | |
}, | |
uglify: { | |
dist: { | |
files: [{ | |
expand: true, | |
cwd: 'dist/', | |
dest: 'dist', | |
src: ['*.js', '!*.min.js'], | |
ext: '.min.js', | |
extDot: 'first' | |
}] | |
} | |
}, | |
jshint: { | |
files: ['Gruntfile.js', 'src/**/*.js', '<%= concat.master.src %>'], | |
options: { | |
globals: { | |
module: false, | |
jQuery: false, | |
window: false, | |
setTimeout: false, | |
document: false, | |
console: false | |
}, | |
strict: true, | |
curly: true, | |
eqeqeq: true, | |
immed: true, | |
latedef: true, | |
newcap: true, | |
noarg: true, | |
sub: true, | |
undef: true, | |
unused: true, | |
eqnull: true, | |
noempty: true, | |
expr: false, | |
trailing: true | |
} | |
}, | |
watch: { | |
files: ['<%= jshint.files %>'], | |
tasks: ['default'] | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.registerTask('default', ['jshint', 'concat', 'uglify']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment