Created
June 29, 2013 07:40
-
-
Save tjchaplin/5890254 to your computer and use it in GitHub Desktop.
A sample grunt configuration
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
| module.exports = function(grunt) { | |
| // configuration. | |
| grunt.initConfig({ | |
| //Package file | |
| pkg: grunt.file.readJSON("package.json"), | |
| //jshint - configuration | |
| jshint: { | |
| files: ["gruntfile.js", "index.js", "lib/**/*.js","test/**/*.js"], | |
| options: { | |
| globals: { | |
| console: true, | |
| module: true | |
| } | |
| } | |
| }, | |
| //release - configuration | |
| release: { | |
| options: { | |
| bump: true, | |
| file: "package.json", | |
| add: true, | |
| commit: true, | |
| tag: true, | |
| push: true, | |
| pushTags: true, | |
| npm: true | |
| } | |
| }, | |
| //watch - configuration | |
| watch: { | |
| files: ["<%= jshint.files %>"], | |
| tasks: ["jshint"] | |
| } | |
| }); | |
| //load the installed plugins | |
| grunt.loadNpmTasks("grunt-release"); | |
| grunt.loadNpmTasks("grunt-contrib-watch"); | |
| grunt.loadNpmTasks("grunt-contrib-jshint"); | |
| //register tasks so you can do:"grunt release" from the command line | |
| grunt.registerTask("default", ["jshint"]); | |
| grunt.registerTask("release", ["release"]); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment