UNPKG

699 BJavaScriptView Raw
1"use strict";
2
3module.exports = function (grunt) {
4 grunt.initConfig({
5 mochaTest: {
6 options: {
7 reporter: "spec"
8 },
9 unit: {
10 src: ["test/**/*.js"]
11 }
12 },
13 jshint: {
14 options: {
15 reporter: require("jshint-stylish")
16 },
17 javascript: {
18 src: [
19 "lib/**/*.js",
20 "index.js",
21 "tests/**/*.js"
22 ],
23 options: {
24 jshintrc: ".jshintrc"
25 }
26 }
27 },
28 jscs: {
29 javascript: {
30 src: [
31 "lib/**/*.js",
32 "index.js",
33 "tests/**/*.js"
34 ],
35 }
36 }
37 });
38
39 grunt.registerTask("default", ["test"]);
40 grunt.registerTask("lint", ["jshint", "jscs"]);
41 grunt.registerTask("test", ["lint", "mochaTest"]);
42
43 require("load-grunt-tasks")(grunt);
44};