{"id":18268745,"url":"https://github.com/ferdodo/typedoc-plugin-include-example","last_synced_at":"2025-04-04T23:31:14.604Z","repository":{"id":193217092,"uuid":"688349818","full_name":"ferdodo/typedoc-plugin-include-example","owner":"ferdodo","description":"Typedoc plugin to include files as example","archived":false,"fork":false,"pushed_at":"2025-02-17T01:02:38.000Z","size":463,"stargazers_count":4,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T20:17:42.056Z","etag":null,"topics":["example","plugin","typedoc","typedoc-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/typedoc-plugin-include-example","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ferdodo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-09-07T07:04:18.000Z","updated_at":"2024-12-22T16:42:00.000Z","dependencies_parsed_at":"2023-09-07T08:28:20.647Z","dependency_job_id":"53e10f9b-b2b4-4668-a756-243a92b5d978","html_url":"https://github.com/ferdodo/typedoc-plugin-include-example","commit_stats":null,"previous_names":["ferdodo/typedoc-plugin-include-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdodo%2Ftypedoc-plugin-include-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdodo%2Ftypedoc-plugin-include-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdodo%2Ftypedoc-plugin-include-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdodo%2Ftypedoc-plugin-include-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ferdodo","download_url":"https://codeload.github.com/ferdodo/typedoc-plugin-include-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123431,"owners_count":20887330,"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":["example","plugin","typedoc","typedoc-plugin"],"created_at":"2024-11-05T11:33:09.475Z","updated_at":"2025-04-04T23:31:14.599Z","avatar_url":"https://github.com/ferdodo.png","language":"TypeScript","readme":"[![Npm package](https://img.shields.io/npm/v/typedoc-plugin-include-example.svg)](https://www.npmjs.com/package/typedoc-plugin-include-example)\n[![npm](https://img.shields.io/npm/dw/typedoc-plugin-include-example)](https://www.npmjs.com/package/typedoc-plugin-include-example)\n[![GitHub](https://img.shields.io/github/license/ferdodo/typedoc-plugin-include-example)](https://github.com/ferdodo/typedoc-plugin-include-example)\n[![Bundle size](https://img.shields.io/bundlephobia/minzip/typedoc-plugin-include-example)](https://bundlephobia.com/package/typedoc-plugin-include-example)\n[![npm](https://img.shields.io/badge/coverage-blue)](https://ferdodo.github.io/typedoc-plugin-include-example/reports/mutation/mutation.html)\n[![npm](https://img.shields.io/badge/demo-green)](https://ferdodo.github.io/typedoc-plugin-include-example/)\n\nInclude code examples in your [typedoc](https://typedoc.org/) documentations.\n\n### Installation\n\n```bash\n$ npm install --save-dev typedoc-plugin-include-example\n```\n\n### Usage\n\nWrite your example in a file.\n\n```javascript\nimport { greet } from \"./greet.js\"\ngreet();\n```\n\nAdd the @includeExample tag with the example path.\n\n```javascript\n/**\n * @includeExample src/greet.example.js\n */\nexport function greet() {\n    console.log(\"Hello there.\")\n}\n```\n\nThen generate your documentation using typedoc.\n\n```bash\n$ npx typedoc --plugin typedoc-plugin-include-example\n```\n\n### Why including examples ?\n\nDemonstrating how to use with examples has always been an essential part of making documentations accessible for newcomers. This plugin provides a conventionnal way of defining examples within your whole documentation.\n\nFiles as example never get out of date. If you're using type checking or other tools for code validation, example will need to be updated to follow the project evolutions.\n\n### Best practice\n\nI recommend to include a whole file for each example, not specific lines, because line numbers can quickly get out of date. In the future I'll make the file path optionnal, making the convention `./\u003csourceFile\u003e.example.\u003cextention\u003e` the default for example file paths.\n\n### Features\n\n- Selecting specific lines.\n- Selecting line ranges.\n- Using multiple selections.\n\nSee the [Documentation](./docs.md) for full usage.\n\n### Links\n\n- [Typedoc](https://typedoc.org/)'s website.\n- [Package](https://www.npmjs.com/package/typedoc-plugin-include-example) on Npm.\n- [Demonsration](https://ferdodo.github.io/typedoc-plugin-include-example/) of what examples looks like.\n- [Documentation](./docs.md) detailling specific features.\n- [Coverage testing](https://ferdodo.github.io/typedoc-plugin-include-example/reports/mutation/mutation.html) report to visualise unit testing efficiency.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdodo%2Ftypedoc-plugin-include-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferdodo%2Ftypedoc-plugin-include-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdodo%2Ftypedoc-plugin-include-example/lists"}