mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
Publish feature and language type definitions
According to the examples, this is part of the public interface. However, type definitions were missing for these files. Closes #2450
This commit is contained in:
parent
6c56744c34
commit
e353080621
1 changed files with 9 additions and 0 deletions
|
|
@ -185,6 +185,15 @@ exports.languages = ${JSON.stringify(languages, null, ' ')};
|
||||||
const jsDestination = path.join(REPO_ROOT, 'out/monaco-editor/esm/metadata.js');
|
const jsDestination = path.join(REPO_ROOT, 'out/monaco-editor/esm/metadata.js');
|
||||||
ensureDir(path.dirname(jsDestination));
|
ensureDir(path.dirname(jsDestination));
|
||||||
fs.writeFileSync(jsDestination, jsContents.replace(/\r\n/g, '\n'));
|
fs.writeFileSync(jsDestination, jsContents.replace(/\r\n/g, '\n'));
|
||||||
|
|
||||||
|
for (const feature of [...features, ...languages]) {
|
||||||
|
const entries = [].concat(feature.entry);
|
||||||
|
for (const entry of entries) {
|
||||||
|
const dtsDestination = path.join(REPO_ROOT, 'out/monaco-editor/esm', entry) + '.d.ts';
|
||||||
|
ensureDir(path.dirname(dtsDestination));
|
||||||
|
fs.writeFileSync(dtsDestination, 'export {}\n');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue