forked from clientIO/joint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
53 lines (43 loc) · 1009 Bytes
/
rollup.config.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
import * as modules from './rollup.resources';
const JOINT = [
modules.version,
modules.joint
];
const LIBS_ESM = [
modules.jquery,
modules.lodash,
modules.backbone,
modules.dagre
];
const DIST = [
modules.version,
modules.jointCore,
modules.geometry,
modules.vectorizer,
].concat(modules.jointPlugins).concat(LIBS_ESM);
const TEST_BUNDLE = [
modules.jointNoDependencies
];
export default commandLineArgs => {
// rollup -c --config-joint
if (commandLineArgs['config-joint']) {
return JOINT;
}
// rollup -c --config-libs-esm
if (commandLineArgs['config-libs-esm']) {
return LIBS_ESM;
}
// rollup -c --config-dist
if (commandLineArgs['config-dist']) {
return DIST;
}
// rollup -c --config-test-bundle
if (commandLineArgs['config-test-bundle']) {
return TEST_BUNDLE;
}
// all
return JOINT
.concat(LIBS_ESM)
.concat(DIST)
.concat(TEST_BUNDLE);
};