move linting work to electron-docs-linter's new CLI
This commit is contained in:
parent
56a644d49f
commit
5937d37fc5
3 changed files with 4 additions and 6239 deletions
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const lint = require('electron-docs-linter')
|
||||
const args = process.argv.slice(2)
|
||||
const docsPath = path.join(__dirname, '../docs/api')
|
||||
const targetVersion = args[0]
|
||||
const outFile = path.join(__dirname, '../docs/api.json')
|
||||
|
||||
if (!targetVersion) {
|
||||
console.error(`Usage: ./script/lint-docs.js <targetVersion>`)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
lint(docsPath, targetVersion).then(function(apis) {
|
||||
fs.writeFileSync(outFile, JSON.stringify(apis, null, 2))
|
||||
console.log(`Wrote ${outFile}`)
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue