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
6217
docs/api.json
6217
docs/api.json
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"asar": "^0.11.0",
|
"asar": "^0.11.0",
|
||||||
"electabul": "~0.0.4",
|
"electabul": "~0.0.4",
|
||||||
"electron-docs-linter": "^1.0.1",
|
"electron-docs-linter": "^1.3.0",
|
||||||
"request": "*",
|
"request": "*",
|
||||||
"standard": "^7.1.2",
|
"standard": "^7.1.2",
|
||||||
"standard-markdown": "^1.2.1"
|
"standard-markdown": "^1.2.1"
|
||||||
|
@ -29,11 +29,12 @@
|
||||||
"clean": "python ./script/clean.py",
|
"clean": "python ./script/clean.py",
|
||||||
"coverage": "npm run instrument-code-coverage && npm test -- --use-instrumented-asar",
|
"coverage": "npm run instrument-code-coverage && npm test -- --use-instrumented-asar",
|
||||||
"instrument-code-coverage": "electabul instrument --input-path ./lib --output-path ./out/coverage/electron.asar",
|
"instrument-code-coverage": "electabul instrument --input-path ./lib --output-path ./out/coverage/electron.asar",
|
||||||
"lint": "npm run lint-js && npm run lint-cpp && npm run lint-py && npm run lint-docs",
|
"lint": "npm run lint-js && npm run lint-cpp && npm run lint-py && npm run lint-api-docs-js && npm run lint-api-docs",
|
||||||
"lint-js": "standard && cd spec && standard",
|
"lint-js": "standard && cd spec && standard",
|
||||||
"lint-cpp": "python ./script/cpplint.py",
|
"lint-cpp": "python ./script/cpplint.py",
|
||||||
"lint-py": "python ./script/pylint.py",
|
"lint-py": "python ./script/pylint.py",
|
||||||
"lint-docs": "standard-markdown docs",
|
"lint-api-docs-js": "standard-markdown docs",
|
||||||
|
"lint-api-docs": "electron-docs-linter docs/api",
|
||||||
"preinstall": "node -e 'process.exit(0)'",
|
"preinstall": "node -e 'process.exit(0)'",
|
||||||
"repl": "python ./script/start.py --interactive",
|
"repl": "python ./script/start.py --interactive",
|
||||||
"start": "python ./script/start.py",
|
"start": "python ./script/start.py",
|
||||||
|
|
|
@ -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…
Reference in a new issue