2022-11-14 15:04:36 +00:00
|
|
|
const { parseDocs } = require('@electron/docs-parser');
|
2024-10-03 03:52:01 +00:00
|
|
|
|
2023-06-22 14:21:42 +00:00
|
|
|
const fs = require('node:fs');
|
|
|
|
const path = require('node:path');
|
2022-11-14 15:04:36 +00:00
|
|
|
|
|
|
|
const { getElectronVersion } = require('./lib/get-version');
|
|
|
|
|
|
|
|
parseDocs({
|
|
|
|
baseDirectory: path.resolve(__dirname, '..'),
|
|
|
|
packageMode: 'single',
|
|
|
|
useReadme: false,
|
|
|
|
moduleVersion: getElectronVersion()
|
|
|
|
}).then((api) => {
|
|
|
|
return fs.promises.writeFile(path.resolve(__dirname, '..', 'electron-api.json'), JSON.stringify(api, null, 2));
|
|
|
|
}).catch((err) => {
|
|
|
|
console.error(err);
|
|
|
|
process.exit(1);
|
|
|
|
});
|