Selaa lähdekoodia

Add Grunt and JsHint

Gaël Métais 11 vuotta sitten
vanhempi
commit
709ee60db3
2 muutettua tiedostoa jossa 28 lisäystä ja 1 poistoa
  1. 23 0
      Gruntfile.js
  2. 5 1
      package.json

+ 23 - 0
Gruntfile.js

@@ -0,0 +1,23 @@
+module.exports = function(grunt) {
+
+    // Project configuration.
+    grunt.initConfig({
+        pkg: grunt.file.readJSON('package.json'),
+        
+        jshint: {
+            all: [
+                '*.js',
+                'app/lib/*',
+                'app/nodeControllers/*.js',
+                'app/public/scripts/*.js',
+                'phantomas_custom/**/*.js'
+            ]
+        }
+    });
+
+    require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
+
+
+    grunt.registerTask('hint', ['jshint']);
+
+};

+ 5 - 1
package.json

@@ -12,6 +12,10 @@
     "socket.io": "^1.0.6",
     "body-parser": "^1.5.0"
   },
-  "devDependencies": {},
+  "devDependencies": {
+    "grunt": "^0.4.5",
+    "grunt-contrib-jshint": "^0.10.0",
+    "matchdep": "^0.3.0"
+  },
   "scripts": {}
 }