Skip to content

Commit f6b6a97

Browse files
committed
Take typings from tsconfig.monaco.json
1 parent 711ed6c commit f6b6a97

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

build/gulpfile.editor.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,6 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
7171
apiusages,
7272
extrausages
7373
],
74-
typings: [
75-
'typings/lib.ie11_safe_es6.d.ts',
76-
'typings/thenable.d.ts',
77-
'typings/es6-promise.d.ts',
78-
'typings/require-monaco.d.ts',
79-
"typings/lib.es2018.promise.d.ts",
80-
'vs/monaco.d.ts'
81-
],
8274
libs: [
8375
`lib.es5.d.ts`,
8476
`lib.dom.d.ts`,

build/lib/standalone.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ function extractEditor(options) {
4444
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
4545
options.compilerOptions = compilerOptions;
4646
console.log(`Running with shakeLevel ${tss.toStringShakeLevel(options.shakeLevel)}`);
47+
// Take the extra included .d.ts files from `tsconfig.monaco.json`
48+
options.typings = tsConfig.include.filter(includedFile => /\.d\.ts$/.test(includedFile));
4749
let result = tss.shake(options);
4850
for (let fileName in result) {
4951
if (result.hasOwnProperty(fileName)) {

build/lib/standalone.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
5252

5353
console.log(`Running with shakeLevel ${tss.toStringShakeLevel(options.shakeLevel)}`);
5454

55+
// Take the extra included .d.ts files from `tsconfig.monaco.json`
56+
options.typings = (<string[]>tsConfig.include).filter(includedFile => /\.d\.ts$/.test(includedFile));
57+
5558
let result = tss.shake(options);
5659
for (let fileName in result) {
5760
if (result.hasOwnProperty(fileName)) {

0 commit comments

Comments
 (0)