-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathgulpfile.ts
50 lines (46 loc) · 1.63 KB
/
gulpfile.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
import { series, parallel } from "gulp";
import DevelopmentServer from "./gulp/DevelopmentServer";
import { compileGenerationTypescript } from "./gulp/compileGenerationTypescript";
import { generateFiles } from "./gulp/generateFiles";
import { watchJavascriptForGeneration } from "./gulp/watchJavascriptForGeneration";
import { watchCodeExamples } from "./gulp/watchCodeExamples";
import { runDevelopmentHTTPServer } from "./gulp/runDevelopmentHTTPServer";
import { compileClientSideTypescript } from "./gulp/compileClientSideTypescript";
import { watchClientSideTypescript } from "./gulp/watchClientSideTypescript";
import { watchGenerationTypescript } from "./gulp/watchGenerationTypescript";
/**
* Use this to build the site
*/
export const build = series(
parallel(compileGenerationTypescript, compileClientSideTypescript),
generateFiles
);
const devServer = new DevelopmentServer();
/**
* Use this to develop the site
*/
export const dev = parallel(
/**
* We will watch the typescript in ./scripts/src/clientSide
*/
watchClientSideTypescript,
/**
* We will watch the typescript in ./scripts/src/fileGenerators
*/
watchGenerationTypescript,
/**
* The typescript compiler will watch the javascript generated from the typescript.
* Then it will generate the HTML from javascript
*/
watchJavascriptForGeneration(devServer),
/**
* Generate files on code Example change
*/
watchCodeExamples(devServer),
/**
* Run a simple http server to server the html. It also injects a live reload script into
* every http page to make development quicker
*/
runDevelopmentHTTPServer(devServer)
);
export default dev;