{"id":15198656,"url":"https://github.com/electron/electron-docs","last_synced_at":"2025-10-02T13:31:30.564Z","repository":{"id":57221607,"uuid":"61329944","full_name":"electron/electron-docs","owner":"electron","description":"Fetch Electron documentation as raw markdown strings","archived":true,"fork":false,"pushed_at":"2021-06-01T21:12:18.000Z","size":105,"stargazers_count":8,"open_issues_count":2,"forks_count":14,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-04-14T03:56:18.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://npm.im/electron-docs","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-16T22:32:37.000Z","updated_at":"2023-01-28T08:32:48.000Z","dependencies_parsed_at":"2022-08-29T04:10:10.081Z","dependency_job_id":null,"html_url":"https://github.com/electron/electron-docs","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Felectron-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Felectron-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Felectron-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Felectron-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electron","download_url":"https://codeload.github.com/electron/electron-docs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219866459,"owners_count":16554232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-28T01:23:52.453Z","updated_at":"2025-10-02T13:31:25.244Z","avatar_url":"https://github.com/electron.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-docs [![Build Status](https://travis-ci.org/electron/electron-docs.svg?branch=master)](https://travis-ci.org/electron/electron-docs)\n\nThis package consumes the [electron/electron](https://github.com/electron/electron)\nrepo in search of markdown files, and returns an array of file objects with stringified\nfile contents.\n\nIt is used by Electron's [docs linter](https://github.com/electron/electron-docs-linter).\n\n## Installation\n\n```sh\nnpm install electron-docs --save\n```\n\n## Programmatic Usage\n\nRequire the function and call it with any of the following:\n\n- A remote branch name, like `main`\n- A version number, like `1.4.4`\n- A version number that starts with a `v`, like `v1.7.0`\n- A commit SHA, like `76375a83eb3a97e7aed14d37d8bdc858c765e564`\n- A local directory, like `~/my/path/to/electron/`\n\n```js\nconst electronDocs = require('electron-docs')\n\nelectronDocs('main').then(function(docs) {\n  // docs is an array of objects, one for each markdown file in /docs\n})\n```\n\nEach object in the `docs` array looks like this:\n\n```js\n{\n slug: \"windows-store-guide\",\n filename: \"docs/tutorial/windows-store-guide.md\",\n markdown_content: \"# Windows Store Guide\\n\\n...\"\n}\n```\n\nWhen fetching docs from a local directory, be sure to use a full path:\n\n```js\nconst path = require('path')\nconst docsPath = path.join(__dirname, 'docs')\nelectronDocs(docsPath).then(function(docs) {\n  // ...\n})\n```\n\nIf you prefer node-style callbacks instead of promises, those are supported too:\n\n```js\nelectronDocs('1.0.0', function(err, docs) {\n  console.log(err, docs)\n})\n```\n\n## CLI Usage\n\nAdd this to your package.json file:\n\n```json\n{\n  \"scripts\": {\n    \"docs\": \"electron-docs \u003e docs.json\"\n  }\n}\n```\n\nWhen you run `npm run docs`, the module writes the stringified JSON object to\n`stdout`, and the output is piped into a file.\n\n`stdout` ftw!\n\n## Tests\n\n```sh\nnpm i \u0026\u0026 npm t\n```\n\n## Dependencies\n\n- [got](https://ghub.io/got): Simplified HTTP requests\n- [gunzip-maybe](https://github.com/mafintosh/gunzip-maybe): Transform stream that gunzips its input if it is gzipped and just echoes it if not\n- [node-dir](https://ghub.io/node-dir): asynchronous file and directory operations for Node.js\n- [ora](https://ghub.io/ora): Elegant terminal spinner\n- [path-exists](https://ghub.io/path-exists): Check if a path exists\n- [pify](https://github.com/sindresorhus/pify): Promisify a callback-style function\n- [semver](https://ghub.io/semver): The semantic version parser used by npm.\n- [tar-fs](https://github.com/mafintosh/tar-fs): filesystem bindings for tar-stream\n\n## Dev Dependencies\n\n- [tap-spec](https://github.com/scottcorgan/tap-spec): Formatted TAP output like Mocha\u0026#39;s spec reporter\n- [tape](https://github.com/substack/tape): tap-producing test harness for node and browsers\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron%2Felectron-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectron%2Felectron-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron%2Felectron-docs/lists"}