-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
55 lines (47 loc) · 1.18 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// This line makes your node configurations available for use
pkg: grunt.file.readJSON('package.json'),
// This is where we configure JSHint
jshint: {
options: {
jshintrc: '.jshintrc'
},
// You get to make the name
// The paths tell JSHint which files to validate
gruntfile: {
src: 'Gruntfile.js'
},
lib: {
src: ['lib/**/*.js']
},
test: {
src: ['test/eg-helper-test.js']
}
},
jscs: {
options: {
config: '.jscsrc'
},
// just lint the source dir
source: {
src: ['lib/**/*.js']
},
// fix any linting errors that can be fixed
fixup: {
src: ['lib/**/*.js'],
options: {
fix: true
}
}
}
});
// Each plugin must be loaded following this pattern
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');
// Custom task(s).
// First argument names the task for use in command line
// Second argument is a list of tasks to be run
grunt.registerTask('default', ['jshint']);
};