forked from mozilla-appmaker/appmaker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
executable file
·112 lines (109 loc) · 3.16 KB
/
Gruntfile.js
File metadata and controls
executable file
·112 lines (109 loc) · 3.16 KB
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
109
110
111
112
module.exports = function( grunt ) {
grunt.initConfig({
pkg: grunt.file.readJSON( "package.json" ),
simplemocha: {
options: {
timeout: 3000,
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']
},
requirejs: {
compile: {
options: {
baseUrl: "./public/javascripts",
mainConfigFile: "public/javascripts/requireConfig.js",
paths: {
persona: "empty:",
Firebase: "empty:"
},
name: "requireConfig",
include: [
// Dependencies don't seem to work properly for the colorpicker
"jquery",
"jquery-ui",
"colorpicker.swatches.crayola",
"colorpicker.swatches.pantone",
"colorpicker.swatches.ral-classic",
"colorpicker.parts.memory",
"colorpicker.parts.rgbslider",
"colorpicker.parsers.rgbslider",
"colorpicker.parsers.cmyk-parser",
"colorpicker.i18n.de",
"colorpicker.i18n.en",
"colorpicker.i18n.fr",
"colorpicker.i18n.nl",
"colorpicker.i18n.pt-br",
"colorpicker.core",
"designer/index"
],
out: "public/javascripts/designer-build.js",
optimize: "uglify2",
generateSourceMaps: true,
preserveLicenseComments: false
}
}
}
});
grunt.loadNpmTasks("grunt-contrib-csslint");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-lint-inline");
grunt.loadNpmTasks("grunt-simple-mocha");
grunt.loadNpmTasks("grunt-contrib-requirejs");
// 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",
"simplemocha",
"requirejs"
]);
};