forked from botpress/botpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
42 lines (36 loc) · 1.38 KB
/
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 core = require('./build/gulp.core')
const modules = require('./build/gulp.modules')
const package = require('./build/gulp.package')
const gulp = require('gulp')
const ui = require('./build/gulp.ui')
const docs = require('./build/gulp.docs')
const rimraf = require('rimraf')
process.on('uncaughtException', err => {
console.error('An error occurred in your gulpfile: ', err)
process.exit(1)
})
gulp.task('build', gulp.series([core.build(), modules.build(), ui.build()]))
gulp.task('build:ui', ui.build())
gulp.task('build:core', core.build())
gulp.task('build:modules', gulp.series([modules.build()]))
gulp.task('start:guide', docs.startDevServer)
gulp.task('build:guide', docs.buildGuide)
gulp.task('build:reference', docs.buildReference())
gulp.task('package:core', package.packageCore())
gulp.task(
'package',
gulp.series([
package.packageApp,
modules.packageModules(),
package.copyData,
package.copyTemplates,
package.copyNativeExtensions
])
)
gulp.task('watch', gulp.parallel([core.watch, ui.watchAll()]))
gulp.task('watch:core', core.watch)
gulp.task('watch:studio', gulp.series([ui.cleanStudioAssets, ui.createStudioSymlink, ui.watchStudio]))
gulp.task('watch:admin', ui.watchAdmin)
gulp.task('clean:node', cb => rimraf('**/node_modules/**', cb))
gulp.task('clean:out', cb => rimraf('out', cb))
gulp.task('clean:db', cb => rimraf('out/bp/data/storage/core.sqlite', cb))