forked from visgl/loaders.gl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ocularrc.js
59 lines (49 loc) · 1.41 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
/** @typedef {import('ocular-dev-tools').OcularConfig} OcularConfig */
import {dirname, join} from 'path';
import {fileURLToPath} from 'url';
const packageRoot = dirname(fileURLToPath(import.meta.url));
const devModules = join(packageRoot, 'dev-modules');
const testDir = join(packageRoot, 'test');
/** @type {OcularConfig} */
const config = {
babel: false,
lint: {
paths: ['modules', 'dev-docs', 'docs', 'test'], //, 'examples'],
extensions: ['js', 'jsx', 'cjs', 'mjs', 'ts', 'tsx', 'md'] // , 'mdx'],
// extensions: ['js', 'jsx', 'mjs', 'ts', 'tsx', 'md']
},
typescript: {
project: 'tsconfig.build.json'
},
aliases: {
// TEST
test: testDir
},
coverage: {
test: 'browser'
},
bundle: {
globalName: 'loaders',
externals: ['fs', 'path', 'util', 'events', 'stream', 'crypto', 'http', 'https'],
target: ['chrome110', 'firefox110', 'safari15'],
format: 'umd',
globals: {
'@loaders.gl/*': 'globalThis.loaders'
}
},
entry: {
test: 'test/node.ts',
'test-browser': 'test/browser.ts',
bench: 'test/bench/node.js',
'bench-browser': 'test/bench/browser.js',
size: 'test/size/import-nothing.js'
}
// entry: {
// test: 'test/index.ts',
// 'test-browser': 'test/browser.ts',
// bench: 'test/bench/index.js',
// 'bench-browser': 'test/bench/browser.js',
// size: 'test/size/import-nothing.js'
// }
};
export default config;