Created
June 3, 2013 10:22
-
-
Save radupotop/5697315 to your computer and use it in GitHub Desktop.
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) { | |
var appbanner = '/*! Sendmachine <%= grunt.template.today("yyyy-mm-dd HH:MM:ss Z") %> */\nvar build = "<%= grunt.template.today("yyyy-mm-dd HH:MM:ss Z") %>";\n'; | |
grunt.initConfig({ | |
//~pkg: grunt.file.readJSON('package.json'), | |
concat: { | |
options: { | |
banner: appbanner | |
}, | |
dist: { | |
src: ['js/**/*.js', 'js/*.js'], | |
dest: 'sm.js' | |
} | |
}, | |
uglify: { | |
options: { | |
banner: appbanner, | |
mangle: false | |
}, | |
build: { | |
src: 'sm.js', | |
dest: 'sm.min.js' | |
} | |
}, | |
jshint: { | |
files: ['gruntfile.js', 'js/**/*.js', 'js/*.js'], | |
options: { | |
// options here to override JSHint defaults | |
globals: { | |
jQuery: true, | |
console: true, | |
module: true, | |
document: true | |
} | |
} | |
}, | |
less: { | |
options: { | |
yuicompress: true, | |
}, | |
files: ['css/sm.less'] | |
}, | |
}); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.loadNpmTasks('grunt-contrib-less'); | |
grunt.registerTask('default', ['concat', 'uglify', 'less']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment