forked from rctoris/mjpegcanvasjs
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
51 lines (48 loc) · 1.2 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
const webpackConfig = require('./webpack.config.js');
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
webpack: {
myConfig: webpackConfig,
},
watch: {
dev: {
options: {
interrupt: true,
},
files: ['./src/*.js', './src/**/*.js'],
tasks: ['webpack'],
},
build_and_watch: {
options: {
interrupt: true,
},
files: ['Gruntfile.js', './src/*.js', './src/**/*.js'],
tasks: ['build'],
},
},
clean: {
options: {
force: true,
},
doc: ['./doc'],
},
jsdoc: {
doc: {
src: ['./src/*.js', './src/**/*.js'],
options: {
destination: './doc',
},
},
},
});
grunt.loadNpmTasks('grunt-webpack');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.registerTask('dev', ['webpack', 'watch']);
grunt.registerTask('build', ['webpack']);
grunt.registerTask('build_and_watch', ['watch']);
grunt.registerTask('doc', ['clean', 'jsdoc']);
};