-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
.ocularrc.js
68 lines (56 loc) · 1.68 KB
/
.ocularrc.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
/** @typedef {import('ocular-dev-tools').OcularConfig} OcularConfig */
import {dirname, join} from 'path';
import {fileURLToPath} from 'url';
const packageRoot = dirname(fileURLToPath(import.meta.url));
const lumaModules = join(packageRoot, '../luma.gl/modules');
const LUMA_ALIASES_LOCAL = {
'@luma.gl/constants': `${lumaModules}/constants/src`,
'@luma.gl/core': `${lumaModules}/core/src`,
'@luma.gl/engine': `${lumaModules}/engine/src`,
'@luma.gl/webgl': `${lumaModules}/webgl/src`,
'@luma.gl/shadertools': `${lumaModules}/shadertools/src`,
'@luma.gl/test-utils': `${lumaModules}/test-utils/src`,
'@luma.gl/experimental': `${lumaModules}/experimental/src`
};
const useLocalLuma = false;
/** @type {OcularConfig} */
const config = {
lint: {
paths: ['modules', 'test', 'examples']
// paths: ['modules', 'test', 'examples', 'website']
},
babel: false,
bundle: {
globalName: 'deck',
externals: ['h3-js'],
target: ['chrome110', 'firefox110', 'safari15'],
format: 'umd',
globals: {
'@deck.gl/*': 'globalThis.deck',
'@luma.gl/core': 'globalThis.luma',
'@luma.gl/engine': 'globalThis.luma',
'@loaders.gl/core': 'globalThis.loaders',
'h3-js': 'globalThis.h3 || {}'
}
},
typescript: {
project: 'tsconfig.build.json'
},
aliases: {
'deck.gl-test': join(packageRoot, './test')
},
coverage: {
test: 'browser'
},
entry: {
test: 'test/node.ts',
'test-browser': 'index.html',
bench: 'test/bench/index.js',
'bench-browser': 'test/bench/browser.html',
size: 'test/size/import-nothing.js'
}
};
if (useLocalLuma) {
Object.assign(config.aliases, LUMA_ALIASES_LOCAL);
}
export default config;