-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgulpfile.js
42 lines (35 loc) · 961 Bytes
/
gulpfile.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
const gulp = require('gulp')
const pkg = require('./package.json')
const { BundleHelper } = require('maptalks-build-helpers')
const bundleHelper = new BundleHelper(pkg)
gulp.task('build', () => bundleHelper.bundle('index.js'))
gulp.task(
'minify',
gulp.series('build', (done) => {
bundleHelper.minify()
done()
}),
)
gulp.task('watch', () =>
gulp.watch(['index.js', './gulpfile.js'], gulp.series('build')),
)
// const { TestHelper } = require('maptalks-build-helpers')
// const testHelper = new TestHelper()
// const karmaConfig = require('./karma.config.js')
// gulp.task(
// 'test',
// gulp.series('build', (done) => {
// testHelper.test(karmaConfig)
// done()
// }),
// )
// gulp.task(
// 'tdd',
// gulp.series('build', (done) => {
// karmaConfig.singleRun = false
// gulp.watch(['index.js'], ['test'])
// testHelper.test(karmaConfig)
// done()
// }),
// )
gulp.task('default', gulp.series('watch'))