1.2.0 • Published 6 months ago

@electron/docs-parser v1.2.0

Weekly downloads
5,616
License
MIT
Repository
github
Last release
6 months ago

Electron Docs Parser

CircleCI build status npm version

Generate a structured JSON API file from Electron's free-form documentation

Usage

yarn global add @electron/docs-parser
cd ~/projects/path/to/electron/repo
electron-docs-parser --dir ./

# You now have ./electron-api.json with the entire Electron API

Options:

  • --useReadme - Assume all documentation is in the module's base README.md file
  • --dir - The base directory where documentation is located.
    • API documentation must be located in /docs/api within the specified base directory.
    • API structures documentation must be located in /docs/api/structures within the specified base directory.
  • --packageMode - Can be single or multi; default single. Specifying multi allows exporting multiple packages from an API instead of multiple modules from a single package.

How it Works

We generate a markdown AST for every documentation file and search for "Modules", "Classes" and "Structures". We then use the well documented and enforced Electron docs style guide to pull the required information about methods, properties and events from the generated AST.

For more information you should start your code dive in DocsParser.ts and then probably block-parsers.ts.

TypeScript Definitions

The output of this module is used to generate TypeScript definitions for the Electron API. This module itself is not used to generate those definitions - @electron/typescript-definitions is.

Further, if you're looking for tooling that automatically surfaces typings in GitHub PRs, you're probably looking for Archaeologist.

License

MIT

1.2.0

6 months ago

1.1.1

10 months ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.12.4

2 years ago

0.12.3

2 years ago

0.12.2

3 years ago

0.12.1

3 years ago

0.12.0

3 years ago

0.11.0

3 years ago

0.10.1

3 years ago

0.9.3

3 years ago

0.10.0

3 years ago

0.9.2

3 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.0.1

5 years ago