forked from open-wc/custom-elements-manifest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom-elements-manifest.config.js
51 lines (47 loc) · 1.17 KB
/
custom-elements-manifest.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
// const defaultCompilerOptions = {
// noEmitOnError: false,
// allowJs: true,
// experimentalDecorators: true,
// target: 99,
// downlevelIteration: true,
// module: 99,
// strictNullChecks: true,
// moduleResolution: 2,
// esModuleInterop: true,
// noEmit: true,
// pretty: true,
// allowSyntheticDefaultImports: true,
// allowUnreachableCode: true,
// allowUnusedLabels: true,
// skipLibCheck: true,
// };
let typeChecker;
export default {
globs: ['fixtures/01-class/-default/package/**/*.{js,ts}'],
exclude: [],
dependencies: true,
dev: false,
packagejson: true,
plugins: [
test(() => typeChecker)
/** myAwesomePlugin() */
],
overrideModuleCreation: ({ts, globs}) => {
const program = ts.createProgram(globs, {allowJs: true});
typeChecker = program.getTypeChecker();
return program.getSourceFiles().filter(sf => globs.find(glob => sf.fileName.includes(glob)));
},
}
function test(getTypeChecker) {
let typeChecker;
return {
name: 'test',
initialize() {
console.log('initialize')
typeChecker = getTypeChecker();
},
collectPhase({ts, node}) {
// console.log(typeChecker)
}
}
}