Merge pull request #3611 from remcohaszing/feature-type-definitions

Publish feature and language type definitions
This commit is contained in:
Henning Dieterichs 2023-03-02 14:57:24 +01:00 committed by GitHub
commit 920affc75f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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');
}
}
} }
); );
} }