Fetches Electron documentation as raw markdown strings from GitHub or local directories. Version 3.0.2 is the current stable release. It downloads the Electron repo, extracts markdown files from the docs/ folder, and returns an array of objects with slug, filename, and markdown_content. Supports remote branches, version numbers, commit SHAs, or local paths. Used internally by Electron's docs linter. Dependencies include got, gunzip-maybe, tar-fs, and pify.
npm install electron-docsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows CommonJS require, promise and callback usage, fetching docs from remote branch or local directory.
Upgrade to v3.x and use .then() or await. For callbacks, pass a function as second argument.
Always use path.resolve or path.join with __dirname.
Handle the array directly; it contains objects with slug, filename, and markdown_content.
Update to Node >=8.
Use const electronDocs = require('electron-docs') or import electronDocs from 'electron-docs'.Use path.resolve to create an absolute path before calling electronDocs.
Ensure the argument is a valid branch, version, or commit SHA. Check network connectivity.