Skip to content

Instantly share code, notes, and snippets.

@patricksimpson
Last active December 17, 2015 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patricksimpson/5584687 to your computer and use it in GitHub Desktop.
Save patricksimpson/5584687 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
watch: {
grunt: {
files: ["Gruntfile.js", "package.json"],
tasks: "default"
},
javascript: {
files: ["src/client/**/*.js", "src/server/*.js", "specs/**/*Spec.js"],
tasks: "test"
}
},
jasmine: {
src: "src/client/js/*.js",
options: {
specs: "specs/client/*Spec.js"
}
},
mochacli: {
options: {
reporter: "nyan",
ui: "tdd"
},
all: ["specs/server/*Spec.js"]
},
jshint: {
all: [
"Gruntfile.js",
"src/**/*.js",
"spec/**/*.js"
],
options: {
jshintrc: ".jshintrc"
}
}
});
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-jasmine");
grunt.loadNpmTasks("grunt-mocha-cli");
grunt.registerTask("test", ["jshint", "mochacli", "jasmine"]);
grunt.registerTask("default", ["test"]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment