This repository has been archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.web.ts
62 lines (53 loc) · 1.51 KB
/
gulpfile.web.ts
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
import { series } from 'gulp';
import { copy, doRun, task } from './gulpfile.functions';
const cwd = { cwd: `${__dirname}/web` };
const devTimeoutSeconds = 24 * 60 * 60;
const devOptions = {
commandTimeoutSeconds: devTimeoutSeconds
};
const copyBSIcons = () => {
return copy('node_modules/bootstrap-icons/icons/*.svg', 'src/assets/images/bs-icons', cwd);
};
task({
name: 'web:compile',
fct: doRun('node_modules/.bin/ng build --configuration production', {
...cwd,
...devOptions
}),
desc: 'Build the web application (run ng build)'
});
task({
name: 'web:compile-dev',
fct: doRun('node_modules/.bin/ng build', {
...cwd,
...devOptions
}),
desc: 'Build the web application in development mode'
});
task({
name: 'web:build',
fct: series('web:install', 'web:compile'),
desc: 'Install all dependencies and compile the application'
});
task({
name: 'web:buildProd',
fct: series('web:unit-test', 'web:compile'),
desc: 'Install all dependencies, runs all unit tests and then compile the application to the production'
});
task({
name: 'web:build-dev',
fct: series('web:install', 'web:compile-dev'),
desc: 'Install all dependencies and compile the application in development mode'
});
task({
name: 'web:dev-assets',
alias: 'wda',
fct: copyBSIcons,
desc: 'Start the web dev server on port 3333'
});
task({
name: 'web:dev',
alias: 'wd',
fct: series('web:dev-assets', doRun('node_modules/.bin/ng serve -o', { ...cwd, ...devOptions })),
desc: 'Start the web dev server on port 3333'
});