UNPKG

1.13 kBJavaScriptView Raw
1"use strict";
2
3module.exports = function(grunt) {
4
5 grunt.initConfig({
6 jshint : {
7 options : {
8 "evil" : true,
9 "expr" : true,
10 "undef" : true,
11 "curly": true,
12 "indent": 2,
13 "white" : false,
14 "devel" : true,
15 "node" : true,
16 "es5": true,
17 "multistr" : true
18 },
19 source : {
20 files : {
21 src : "lib/*.js"
22 }
23 },
24 specs : {
25 files : {
26 src : "test/*.js"
27 },
28 options : {
29 globals : {
30 it : false,
31 describe : false,
32 beforeEach : false,
33 before : false
34 }
35 }
36 }
37 }
38 });
39
40 grunt.loadNpmTasks("grunt-contrib-jshint");
41
42 grunt.registerTask("spec", function() {
43 require("coffee-script");
44
45 var path = require('path'),
46 mocha = new (require('mocha'))({ reporter : "spec" });
47
48 grunt.file.expand([ "test/*.js", "test/*.coffee"])
49 .map(path.resolve)
50 .map(mocha.addFile.bind(mocha));
51
52 mocha.run(this.async());
53 });
54
55 grunt.registerTask("default", [ "jshint", "spec" ]);
56
57}
\No newline at end of file