{"id":18576591,"url":"https://github.com/mmomtchev/documentation-polyglot","last_synced_at":"2025-05-16T01:08:49.694Z","repository":{"id":38018129,"uuid":"433551792","full_name":"mmomtchev/documentation-polyglot","owner":"mmomtchev","description":"C++ plugin for documentation.js","archived":false,"fork":false,"pushed_at":"2023-11-30T16:47:45.000Z","size":2411,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-25T12:08:51.690Z","etag":null,"topics":["documentation","jsdoc","node-addon","node-addon-api","node-addons"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmomtchev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-30T19:01:23.000Z","updated_at":"2023-07-18T09:08:34.000Z","dependencies_parsed_at":"2023-10-03T00:12:54.013Z","dependency_job_id":"fb3bed11-5e42-4c69-87dd-8184cd1a3922","html_url":"https://github.com/mmomtchev/documentation-polyglot","commit_stats":{"total_commits":88,"total_committers":2,"mean_commits":44.0,"dds":0.3522727272727273,"last_synced_commit":"d3b8d4b5f5556e28c38f9e626af65aaaf89c6cbb"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmomtchev%2Fdocumentation-polyglot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmomtchev%2Fdocumentation-polyglot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmomtchev%2Fdocumentation-polyglot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmomtchev%2Fdocumentation-polyglot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmomtchev","download_url":"https://codeload.github.com/mmomtchev/documentation-polyglot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448633,"owners_count":22072765,"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":["documentation","jsdoc","node-addon","node-addon-api","node-addons"],"created_at":"2024-11-06T23:25:33.055Z","updated_at":"2025-05-16T01:08:48.126Z","avatar_url":"https://github.com/mmomtchev.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# documentation-polyglot.js\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/documentationjs/documentation/master/.github/documentation-js-logo.png\" width=\"650\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  The documentation system for modern JavaScript\n\u003c/p\u003e\n\n***When good engineers meet, they discuss algorithms, but when great engineers meet, they discuss documentation***\n\n[![License: ISC](https://img.shields.io/github/license/mmomtchev/documentation-polyglot)](https://github.com/mmomtchev/documentation-polyglot/blob/master/LICENSE)\n[![Node.js CI](https://github.com/mmomtchev/documentation-polyglot/actions/workflows/node.js.yml/badge.svg)](https://github.com/mmomtchev/documentation-polyglot/actions/workflows/node.js.yml)\n[![codecov](https://codecov.io/gh/mmomtchev/documentation-polyglot/branch/master/graph/badge.svg?token=NUOEAMLXG2)](https://codecov.io/gh/mmomtchev/documentation-polyglot)\n\n# Plugin Notes\n\nThis plugin restores the C++ support for `documentation.js`.\n\n**It requires a plugin framework in `documentation.js` that has yet to be merged**. You can install it from here:\n\n```\nnpm install -D @mmomtchev/documentation\n```\n\nIt is an improved version of the old `--polyglot` CLI option of `documentation.js` that got axed in 2017.\n\nThe project should already be usable.\n\nIt uses *dumb* parsing without an AST blindly extracting JSDoc-compliant comment blocks.\n\nI intend to add extensible helpers allowing to extract some (*C++ is notoriously difficult to parse and this aims to be an universal extractor anyways*) information from the C++ code.\n\n# Installation\n\nThe module is not yet published\n\n```\nnpm install -D documentation-polyglot\n```\n\n# Usage\n\nNote that enabling `documentation-polyglot` will also enable `--shallow` if this is not already the case.\n\n## Loading via the command-line\n\n```\ndocumentation build --plugin=documentation-polyglot src/*.cpp lib/*.js -f md -o project.md\n```\n\n## Loading via a configuration file\n\n```\ndocumentation build --config=project-documentation.yml src/*.cpp lib/*.js -f md -o project.md\n```\n\n`project-documentation.yml`:\n```yml\ntoc:\n  - Project Headline\n\nplugin:\n  - documentation-polyglot\n\ndocumentation-polyglot:\n  extensions: [ .cpp ]\n```\n\n## Extracting information from C++ code\n\nAn example for extracting names of `Node::Nan` methods\n\n```yml\ndocumentation-polyglot:\n  extensions: [ .cpp ]\n  infer:\n    kind:\n      function: [ NAN_METHOD\\(.*\\) ]\n    name: [ NAN_METHOD\\s*\\((.*)\\) ]\n```\n\nAn `infer` section applies an implicit JSDoc tag to the tag having the section name:\n * with subsections it will apply the subsection name when one of the provided REs matches.\n * with only REs it will apply the first capture group\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmomtchev%2Fdocumentation-polyglot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmomtchev%2Fdocumentation-polyglot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmomtchev%2Fdocumentation-polyglot/lists"}