-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
44 lines (42 loc) · 1.24 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
module.exports = grunt => {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
cssmin: {
options: {
mergeIntoShorthands: false,
roundingPrecision: -1
},
target: {
files: {
'public/css/main.min.css': ['public/css/main.css']
}
}
},
exec: {
eslint: {
cmd: 'eslint *.js bin/www */*.js */*/*.js --quiet -o log/eslint.log'
},
minGeneral: {
cmd: 'uglifyjs -cm -o public/js/general.min.js -- public/js/general.js'
},
test: {
cmd: 'npm test'
}
},
jsdoc: {
dist: {
src: [
'app.js', 'config.js', 'bin/www', 'test/*.js',
'./db/model/*.js', './route/*.js', './util/*.js'
],
options: {
destination: 'doc'
}
}
}
});
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.registerTask('default', ['cssmin', 'jsdoc', 'exec']);
};