forked from casual-simulation/casualos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
70 lines (63 loc) · 1.96 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
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
const gulp = require('gulp');
const del = require('del');
const childProcess = require('child_process');
const path = require('path');
const fs = require('fs');
let folders = [
`${__dirname}/src/aux-common`,
`${__dirname}/src/aux-components`,
`${__dirname}/src/aux-vm`,
`${__dirname}/src/aux-vm-client`,
`${__dirname}/src/aux-vm-node`,
`${__dirname}/src/aux-vm-browser`,
`${__dirname}/src/aux-vm-deno`,
`${__dirname}/src/causal-trees`,
`${__dirname}/src/causal-tree-server`,
`${__dirname}/src/causal-tree-server-websocket`,
`${__dirname}/src/causal-tree-client-websocket`,
`${__dirname}/src/causal-tree-client-apiary`,
`${__dirname}/src/causal-tree-store-mongodb`,
`${__dirname}/src/causal-tree-store-cassandradb`,
`${__dirname}/src/causal-tree-store-browser`,
`${__dirname}/src/crypto`,
`${__dirname}/src/crypto-node`,
`${__dirname}/src/crypto-browser`,
`${__dirname}/src/tunnel`,
`${__dirname}/src/undom`,
`${__dirname}/src/websocket`,
`${__dirname}/src/fast-json-stable-stringify`,
`${__dirname}/src/fast-json-stable-stringify`,
`${__dirname}/src/expect`,
`${__dirname}/src/chalk`,
`${__dirname}/temp/aux-auth`,
`${__dirname}/temp/aux-server`,
`${__dirname}/src/aux-records`,
`${__dirname}/src/aux-records-aws`,
`${__dirname}/src/timesync`,
];
let patterns = [
`/**/*.js`,
`/**/*.js.map`,
`/**/*.ts.map`,
`/**/*.d.ts`,
`/*.tsbuildinfo`,
];
let negativePatterns = [`/typings/**/*`];
let globs = [`${__dirname}/src/aux-server/aux-web/dist`];
folders.forEach((f) => {
patterns.forEach((p) => {
globs.push(f + p);
});
negativePatterns.forEach((p) => {
globs.push(`!${f}${p}`);
});
});
gulp.task('clean', function () {
return del(globs);
});
gulp.task('clean:cache', function () {
return del([
`${__dirname}/src/aux-server/node_modules/.vite`,
`${__dirname}/src/aux-auth/node_modules/.vite`,
]);
});