This repository has been archived by the owner on Mar 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 194
/
Gruntfile.js
executable file
·108 lines (106 loc) · 2.82 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
module.exports = function( grunt ) {
grunt.initConfig({
pkg: grunt.file.readJSON( "package.json" ),
simplemocha: {
options: {
timeout: 30000,
ignoreLeaks: true,
ui: 'bdd',
reporter: 'spec'
},
all: { src: 'test/*.js' }
},
csslint: {
lax: {
options: {
"adjoining-classes": false,
"box-model": false,
"box-sizing": false,
"bulletproof-font-face": false,
"compatible-vendor-prefixes": false,
"ids": false,
"important": false,
"outline-none": false,
"overqualified-elements": false,
"qualified-headings": false,
"regex-selectors": false,
"star-property-hack": false,
"underscore-property-hack": false,
"universal-selector": false,
"unique-headings": false,
"unqualified-attributes": false,
"vendor-prefix": false,
"zero-units": false
},
src: [
"public/**/*.css"
]
}
},
jshint: {
options: {
"-W054": true, // The Function constructor is a form of eval
"-W069": true // thing["property"] is better written in dot notation
},
files: [
"Gruntfile.js",
"app.js",
"public/javascripts/**/*.js",
"public/ceci/*.js",
"public/designer/**.js"
]
},
inlinelint: {
html: ['public/ceci/**/*.html',
'public/designer/*.html'],
ejs: ['**/*.ejs']
},
gettext_finder: {
files: [
"views/*.html",
"views/**/*.html",
"views/*.ejs",
"views/**/*.ejs",
"public/ceci/**/*.html",
"public/ceci/**/*.js",
"public/designer/**/*.html",
"public/designer/**/*.js",
"public/templates/**/*.html",
"public/templates/**/*.js",
"public/samples/**/*.html",
"public/samples/**/*.js",
"public/tutorial/*.ejs"
],
options: {
pathToJSON: [ "locale/en_US/msg.json" ],
extraSearchRegexp: [
/[lL]10n(\.get)?\(["'][^)]+["']\)/g,
/\{\{\s*["'][^|]+["']\s*\|\s*l10n\s*\}\}/g
]
}
},
shell: {
options: {
stderr: false
},
target: {
command: 'node appcache.js'
}
}
});
grunt.loadNpmTasks("grunt-contrib-csslint");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-lint-inline");
grunt.loadNpmTasks("grunt-simple-mocha");
grunt.loadNpmTasks('grunt-gettext-finder');
grunt.loadNpmTasks('grunt-shell');
// TODO: the csslinting is turned off right now, because the number
// of warnings is staggering. Some make sense, some don't.
grunt.registerTask("default", [
// "csslint",
"jshint",
"inlinelint",
"shell",
"simplemocha",
]);
};