{"id":15369765,"url":"https://github.com/electrovir/markdown-code-example-inserter","last_synced_at":"2026-02-02T19:39:01.106Z","repository":{"id":40611434,"uuid":"414950243","full_name":"electrovir/markdown-code-example-inserter","owner":"electrovir","description":"Syncs code examples with markdown documentation.","archived":false,"fork":false,"pushed_at":"2024-12-10T02:22:41.000Z","size":1106,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-04-11T02:12:55.848Z","etag":null,"topics":["automatic","code","examples","insert","inserter","interpolator","markdown","readme","snippet"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/markdown-code-example-inserter","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electrovir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-CC0","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-10-08T10:54:23.000Z","updated_at":"2024-12-10T02:22:14.000Z","dependencies_parsed_at":"2024-06-19T20:03:13.168Z","dependency_job_id":"177a5242-1140-4315-a68b-53a7377f1a9b","html_url":"https://github.com/electrovir/markdown-code-example-inserter","commit_stats":{"total_commits":56,"total_committers":1,"mean_commits":56.0,"dds":0.0,"last_synced_commit":"066e6ad1dd8ed50d874279ceb43a9ffbbb9d4727"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrovir%2Fmarkdown-code-example-inserter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrovir%2Fmarkdown-code-example-inserter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrovir%2Fmarkdown-code-example-inserter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrovir%2Fmarkdown-code-example-inserter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electrovir","download_url":"https://codeload.github.com/electrovir/markdown-code-example-inserter/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249084733,"owners_count":21210262,"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":["automatic","code","examples","insert","inserter","interpolator","markdown","readme","snippet"],"created_at":"2024-10-01T13:38:16.757Z","updated_at":"2026-02-02T19:38:56.062Z","avatar_url":"https://github.com/electrovir.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# markdown-code-example-inserter\n\nSyncs markdown documentation with code examples.\n\n# Install\n\nVia [npm](https://www.npmjs.com/package/markdown-code-example-inserter):\n\n```bash\nnpm i -D markdown-code-example-inserter\n```\n\nIt's recommended to install this package as a dev dependency as it is a build-step operation.\n\n# Usage\n\n## Markdown files\n\nAdd an HTML comment that starts with the following text: `example-link:`. Then after that text, include a file path to the example file:\n\n```html\n\u003c!-- example-link: src/readme-examples/do-thing.ts --\u003e\n```\n\n[Here's an example](https://raw.githubusercontent.com/electrovir/markdown-code-example-inserter/main/test-files/full-package-example/README.md) from the GitHub repo. And here is the same file [with the code examples inserted](https://github.com/electrovir/markdown-code-example-inserter/blob/main/test-files/full-package-example/README.expect.md).\n\n## CLI\n\n```bash\nnpx md-code file1.md file2.md [...moreFiles]\n```\n\nAny of the file names can be a glob. Put the glob in quotes if you wish to prevent your shell from expanding it (this package will expand the glob):\n\n```bash\nnpx md-code \"./*.md\"\n```\n\n### Check only\n\nUse `--check`.\n\nCheck if the given files are updated, don't write anything.\n\n```bash\nnpx md-code file1.md --check\n```\n\n### Force an index file\n\nUse `--index`.\n\nForce an index file for imports that should be rewritten with your package name:\n\n```bash\nnpx md-code file1.md --index path/to/index.ts file2.md [...moreFiles]\n```\n\nThe index file is used to replace relative imports with package name imports. Like changing `import from '../../index'` to `import from 'my-package'`.\n\n### Ignore a pattern\n\nUse `--ignore`.\n\n```bash\nnpx md-code \"./**/*.md\" --ignore \"./test-files/**/*\"\n```\n\nMultiple `--ignore` patterns can be used:\n\n```bash\nnpx md-code \"./**/*.md\" --ignore \"./test-files/**/*\" -ignore \"./test-files/**/*\"\n```\n\n`node_modules` is automatically ignored.\n\n### Turn off logging\n\nUse `--silent`\n\n```bash\nnpx md-code --silent file1.md\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrovir%2Fmarkdown-code-example-inserter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectrovir%2Fmarkdown-code-example-inserter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrovir%2Fmarkdown-code-example-inserter/lists"}