Skip to content

Instantly share code, notes, and snippets.

@mattd
Created October 31, 2012 19:52
Show Gist options
  • Save mattd/3989392 to your computer and use it in GitHub Desktop.
Save mattd/3989392 to your computer and use it in GitHub Desktop.
/*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