Skip to content

Instantly share code, notes, and snippets.

@tjchaplin
Created June 29, 2013 07:40
Show Gist options
  • Select an option

  • Save tjchaplin/5890254 to your computer and use it in GitHub Desktop.

Select an option

Save tjchaplin/5890254 to your computer and use it in GitHub Desktop.
A sample grunt configuration
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