forked from mozilla/popcorn.webmaker.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
91 lines (83 loc) · 2.73 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
module.exports = function( grunt ) {
var jsHintOptions = grunt.file.readJSON( ".jshintrc" );
grunt.initConfig({
pkg: grunt.file.readJSON( "package.json" ),
jshint: {
options: jsHintOptions,
files: [
"Gruntfile.js",
"server.js",
"lib/**/*.js",
"package.json",
"public/src/**/*.js",
"public/templates/**/*.js",
"routes/**/*.js"
]
},
cssjanus: {
"public/css/super-scrollbar-rtl.less": "public/css/super-scrollbar-ltr.less",
"public/css/tray-status-bar-rtl.less": "public/css/tray-status-bar-ltr.less",
"public/css/tray-rtl.less": "public/css/tray-ltr.less",
"public/css/tray-timeline-rtl.less": "public/css/tray-timeline-ltr.less",
"public/css/sequencer-rtl.less": "public/css/sequencer-ltr.less",
options: {
swapLtrRtlInUrl: true,
swapLeftRightInUrl: false,
generateExactDuplicates: false
}
},
"string-replace": {
dist: {
files: {
"public/css/super-scrollbar-rtl.less": "public/css/super-scrollbar-rtl.less",
"public/css/tray-status-bar-rtl.less": "public/css/tray-status-bar-rtl.less",
"public/css/tray-rtl.less": "public/css/tray-rtl.less",
"public/css/tray-timeline-rtl.less": "public/css/tray-timeline-rtl.less",
"public/css/sequencer-rtl.less": "public/css/sequencer-rtl.less"
},
options: {
replacements: [{
pattern: "ltr",
replacement: "rtl"
}]
}
}
},
lesslint: {
src: [
"public/css/butter.ui.less",
"public/css/embed.less"
],
options: {
csslint: {
"adjoining-classes": false,
"box-model": false,
"box-sizing": false,
"bulletproof-font-face": false,
"compatible-vendor-prefixes": false,
"duplicate-background-images": false,
"fallback-colors": 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
}
}
}
});
grunt.loadNpmTasks( "grunt-contrib-jshint" );
grunt.loadNpmTasks( "grunt-cssjanus" );
grunt.loadNpmTasks( "grunt-string-replace" );
grunt.loadNpmTasks( "grunt-lesslint" );
grunt.registerTask( "default", [ "jshint", "lesslint" ] );
grunt.registerTask( "build", [ "cssjanus", "string-replace" ]);
};