This repository has been archived by the owner on Mar 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathGruntfile.js
81 lines (72 loc) · 1.77 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
module.exports = function (grunt) {
"use strict";
require("load-grunt-tasks")(grunt);
grunt.initConfig({
"APP": {
"CODE_DIRS": "{,config/**/,loop/**/,test/**/}"
},
"pkg": require("./package.json"),
"copyright": {
"options": {
"pattern": "This Source Code Form is subject to the terms of the Mozilla Public"
},
"src": "<%= eslint.src %>"
},
"eslint": {
"src": "<%= APP.CODE_DIRS %>*.js"
},
"jsonlint": {
"src": "<%= APP.CODE_DIRS %>*.json"
},
"shell": {
"outdated": {
"command": "npm outdated --depth 0"
},
"shrinkwrap": {
"command": "npm shrinkwrap --dev"
},
"rm-shrinkwrap": {
"command": "rm npm-shrinkwrap.json"
}
},
"todo": {
"options": {
"marks": [
{
"name": 'FIX',
"pattern": /FIXME/,
"color": 'red'
},
{
"name": 'TODO',
"pattern": /TODO/,
"color": 'yellow'
},
{
"name": 'NOTE',
"pattern": /NOTE/,
"color": 'blue'
}, {
"name": 'XXX',
"pattern": /XXX/,
"color": 'yellow'
}, {
"name": 'HACK',
"pattern": /HACK/,
"color": 'red'
}
]
},
"src": [
"<%= eslint.src %>",
"!Gruntfile.js"
]
},
"validate-shrinkwrap": {
}
});
grunt.registerTask("lint", ["eslint", "jsonlint"]);
grunt.registerTask("do-shrinkwrap", ["shell:shrinkwrap", "validate-shrinkwrap", "shell:rm-shrinkwrap"]);
grunt.registerTask("audit-shrinkwrap", ["do-shrinkwrap", "shell:outdated"]);
grunt.registerTask("default", ["lint", "copyright"]);
};