forked from bobbyrne01/save-text-to-file-firefox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
104 lines (101 loc) · 2.35 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['Gruntfile.js', 'package.json', 'addon/package.json', 'addon/lib/*.js', 'addon/data/js/*.js'],
options: {
moz: true,
force: true, // don't stop when there is an error
maxerr: 10000 // keep running no matter how many errors were found
}
},
jsbeautifier: {
files: ['<%= jshint.files %>', 'addon/data/html/view.html', 'addon/data/css/style.css'],
options: {
js: {
braceStyle: "collapse",
breakChainedMethods: false,
e4x: false,
evalCode: false,
indentChar: "\t",
indentLevel: 0,
indentSize: 1,
indentWithTabs: true,
jslintHappy: true,
keepArrayIndentation: false,
keepFunctionIndentation: false,
maxPreserveNewlines: 10,
preserveNewlines: true,
spaceBeforeConditional: true,
spaceInParen: false,
unescapeStrings: false,
wrapLineLength: 0
},
html: {
braceStyle: "collapse",
indentChar: "\t",
indentScripts: "keep",
indentSize: 1,
maxPreserveNewlines: 10,
preserveNewlines: true,
unformatted: ["a", "sub", "sup", "b", "i", "u"],
wrapLineLength: 0
},
css: {
indentChar: "\t",
indentSize: 1
}
}
},
htmllint: {
all: {
options: {
ignore: 'Empty heading.'
},
src: "addon/data/html/*.html"
}
},
csslint: {
strict: {
options: {
import: 2
},
src: ['addon/data/css/*.css']
}
},
notify_hooks: {
options: {
enabled: true,
max_jshint_notifications: 2,
success: true
}
},
release: {
options: {
file: 'package.json',
additionalFiles: ['addon/package.json'],
bump: true,
add: true,
commit: true,
tag: true,
push: true,
pushTags: true,
npm: false,
npmtag: false,
github: {
repo: 'bobbyrne01/save-text-to-file-firefox',
usernameVar: 'GITHUB_USERNAME',
passwordVar: 'GITHUB_PASSWORD'
}
}
}
});
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks("grunt-jsbeautifier");
grunt.loadNpmTasks('grunt-html');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-release');
grunt.registerTask('default', ['jsbeautifier', 'jshint', 'htmllint', 'csslint']);
grunt.task.run('notify_hooks');
};