-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathGruntfile.js
More file actions
54 lines (50 loc) · 1.42 KB
/
Copy pathGruntfile.js
File metadata and controls
54 lines (50 loc) · 1.42 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
'use strict';
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-jslint');
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
dist: {
files: {
'public/build/bundle.js': ['public/src/**/*.js']
}
}
},
jslint: { // configure the task
// lint your project's server code
server: {
src: [
'**/*.js',
'!public/**/*.js',
'!node_modules/**/*.js'
],
directives: {
nomen: true,
node: true
},
options: {
errorsOnly: false,
failOnError: false
}
},
// lint your project's client code
client: {
src: [
'public/src/**/*.js'
],
directives: {
nomen: true,
browser: true,
node: true
},
options: {
errorsOnly: false,
failOnError: false
}
}
}
});
grunt.registerTask('default', ['jslint', 'browserify']);
};