Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: provide moduleVersion to docs-parser directly (#36336)
build: provide moduleVersion to docs-parser directly (#36329)
- Loading branch information
1 parent
3afea23
commit cc8d02d
Showing
3 changed files
with
28 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { parseDocs } = require('@electron/docs-parser'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters