Skip to content

Instantly share code, notes, and snippets.

@efleming969
Created December 12, 2013 17:06
Show Gist options
  • Select an option

  • Save efleming969/7931443 to your computer and use it in GitHub Desktop.

Select an option

Save efleming969/7931443 to your computer and use it in GitHub Desktop.
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
browserify: {
basic: {
src: ["client/Main.js"],
dest: "static/index.js"
},
test: {
src: ["client/MainTest.js"],
dest: "tmp/client-tests.js"
}
},
jshint: {
client: ["client/**/*.js"]
},
watch: {
client: {
files: ["client/**/*.js"],
tasks: ["jshint", "browserify"],
options: {
spawn: false
}
},
test: {
files: ["client/**/*.js", "test/client/*.js"],
tasks: ["jshint", "browserify:test"],
options: {
spawn: false
}
}
},
nodemon: {
basic: {
options: {
watchedFolders: ["server"]
}
}
}
});
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-browserify");
grunt.loadNpmTasks("grunt-nodemon");
grunt.registerTask("default", ["watch"]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment