forked from yangchenyun/ask
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrunt.js
More file actions
66 lines (61 loc) · 1.55 KB
/
grunt.js
File metadata and controls
66 lines (61 loc) · 1.55 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
test: {
files: ['test/**/*.js']
},
lint: {
files: ['bin/**/*.js', 'lib/**/*.js', 'test/**/*.js']
},
watch: {
files: '<config:lint.files>',
tasks: 'default'
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
node: true
},
globals: {
exports: true
}
},
jsvalidate: {
files: ['./grunt.js', './bin/*', './lib/*.js', 'test/*.js'],
},
// jsbeautifier: {
// files: ['./grunt.js', './bin/*', './lib/*.js', 'test/*.js'],
// options: {
// "indent_size": 2,
// "indent_char": " ",
// "indent_level": 0,
// "indent_with_tabs": false,
// "preserve_newlines": true,
// "max_preserve_newlines": 10,
// "jslint_happy": false,
// "brace_style": "collapse",
// "keep_array_indentation": false,
// "keep_function_indentation": false,
// "space_before_conditional": true,
// "eval_code": false,
// "indent_case": false,
// "unescape_strings": false
// }
// }
});
//
grunt.loadNpmTasks('grunt-jsvalidate');
//grunt.loadNpmTasks('grunt-jsbeautifier');
// Default task. u
grunt.registerTask('default', 'jsvalidate');
};