Created
October 31, 2012 19:52
-
-
Save mattd/3989392 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/*global module:false*/ | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
// Metadata. | |
pkg: grunt.file.readJSON('package.json'), | |
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + | |
'<%= grunt.template.today("yyyy-mm-dd") %>\n' + | |
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + | |
'* Copyright (c) <%= grunt.template.today("yyyy") %> ' + | |
'<%= pkg.author.name %>;' + | |
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', | |
// Task configuration. | |
connect: { | |
options: { | |
base: './app' | |
} | |
}, | |
reload: { | |
proxy: { | |
port: 8000 | |
} | |
}, | |
jshint: { | |
options: { | |
bitwise: true, | |
curly: true, | |
globals: {} | |
}, | |
all: [ | |
'Gruntfile.js', | |
'app/**/*.js', | |
'!app/scripts/lib/**/*.js', | |
'test/**/*.js' | |
] | |
}, | |
watch: { | |
reload: { | |
files: '<%= jshint.all %>', | |
tasks: 'reload', | |
} | |
} | |
}); | |
// Load tasks. | |
grunt.util._.each([ | |
'contrib-connect', | |
'contrib-jshint', | |
'contrib-watch', | |
'reload' | |
], function (tasks) { | |
grunt.loadNpmTasks('grunt-' + tasks); | |
}); | |
grunt.registerTask("serve", ["connect", "watch"]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment