-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.mjs
79 lines (70 loc) · 1.9 KB
/
gulpfile.mjs
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import gulp from 'gulp'
import taskListing from 'gulp-task-listing'
import { updateAssetsVersion } from './tasks/asset-version.mjs'
import { clean } from './tasks/clean.mjs'
import { compileJavaScripts } from './tasks/compile-javascripts.mjs'
import { compileStylesheets } from './tasks/compile-stylesheets.mjs'
import { copyAssets, copyFiles } from './tasks/gulp/copy-to-destination.mjs'
import { watch } from './tasks/gulp/watch.mjs'
import { npmScriptTask } from './tasks/run.mjs'
/**
* Umbrella scripts tasks (for watch)
* Runs JavaScript code quality checks, documentation, compilation
*/
gulp.task(
'scripts',
gulp.series(
gulp.parallel(npmScriptTask('lint:js'), compileJavaScripts),
npmScriptTask('build:jsdoc')
)
)
/**
* Umbrella styles tasks (for watch)
* Runs Sass code quality checks, documentation, compilation
*/
gulp.task(
'styles',
gulp.series(
gulp.parallel(npmScriptTask('lint:scss'), compileStylesheets),
npmScriptTask('build:sassdoc')
)
)
/**
* Compile task for local & heroku
* Runs JavaScript and Sass compilation, including documentation
*/
gulp.task(
'compile',
gulp.series(clean, copyAssets, compileJavaScripts, compileStylesheets)
)
/**
* Dev task
* Runs a sequence of tasks on start
*/
gulp.task(
'dev',
gulp.series('compile', watch, npmScriptTask('serve', ['--workspace', 'app']))
)
/**
* Build package task
* Prepare package folder for publishing
*/
gulp.task(
'build:package',
gulp.series(clean, copyFiles, compileJavaScripts, compileStylesheets)
)
/**
* Build dist task
* Prepare dist folder for release
*/
gulp.task('build:dist', gulp.series(clean, copyAssets, compileJavaScripts, compileStylesheets, updateAssetsVersion))
/**
* Build dist storybook task
* Prepare dist folder for storybook
*/
gulp.task('build:storybook:dist', gulp.series(clean, 'compile'))
/**
* Default task
* Lists out available tasks
*/
gulp.task('default', taskListing)