diff --git a/.gitignore b/.gitignore index bc3e989..850254c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ logs*/ Thumbs.db -npm-debug.log \ No newline at end of file +npm-debug.logGruntfile.js diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..44125d4 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,44 @@ +'use strict'; + +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + jshint: { + options: { + jshintrc: '.jshintrc' + }, + gruntfile: { + src: ['scribe.js', 'Gruntfile.js'] + }, + lib: { + src: ['lib/**/*.js', 'examples/**/*.js', 'static/js/**/*.js'] + }, + test: { + src: ['test/**/*.js'] + }, + }, + watch: { + gruntfile: { + files: '<%= jshint.gruntfile.src %>', + tasks: ['jshint:gruntfile'] + }, + lib: { + files: '<%= jshint.lib.src %>', + tasks: ['jshint:lib'] + }, + test: { + files: '<%= jshint.test.src %>', + tasks: ['jshint:test'] + }, + }, + }); + + // These plugins provide necessary tasks. + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-watch'); + + // Default task. + grunt.registerTask('default', ['jshint']); + +};