forked from stalgiag/p5.xr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
55 lines (53 loc) · 1.02 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 = (grunt) => {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
eslint: {
target: ['src/**/*.js'],
options: {
fix: true,
},
},
karma: {
unit: {
configFile: 'karma.conf.js',
},
},
run: {
build: {
cmd: 'npm',
args: [
'run',
'build',
],
options: {
failOnError: true,
},
},
},
jsdoc2md: {
oneOutputFile: {
src: 'src/**/*.js',
dest: 'docs/reference/app.md',
options: {
'no-gfm': true,
separators: true,
'global-index-format': 'none',
},
},
},
});
// Load task plugins
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-run');
grunt.loadNpmTasks('grunt-jsdoc-to-markdown');
// Tasks
grunt.registerTask('build', [
'eslint',
'karma:unit',
'run:build',
]);
grunt.registerTask('docs', [
'jsdoc2md',
]);
};