build: update ts defs and docs parser (#43985)

* build: update ts defs and docs parser

* build: update dig
This commit is contained in:
Samuel Attard 2024-10-11 07:44:18 -07:00 committed by GitHub
parent 5400c04e43
commit 7402648ee3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 206 additions and 274 deletions

View file

@ -0,0 +1,17 @@
import { parseDocs } from '@electron/docs-parser';
import { promises } from 'node:fs';
import { resolve } from 'node:path';
import { getElectronVersion } from './lib/get-version.js';
parseDocs({
baseDirectory: resolve(import.meta.dirname, '..'),
packageMode: 'single',
useReadme: false,
moduleVersion: getElectronVersion()
}).then((api) => {
return promises.writeFile(resolve(import.meta.dirname, '..', 'electron-api.json'), JSON.stringify(api, null, 2));
}).catch((err) => {
console.error(err);
process.exit(1);
});