{"_id":"remark-source-code","_rev":"2-afd7f12b7cdebfe4d09b108b8669ca35","name":"remark-source-code","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"remark-source-code","version":"0.0.1","keywords":["mdast","remark","plugin","mdast-plugin","remark-plugin","source-code","code-import"],"author":{"name":"anubra266"},"license":"MIT","_id":"remark-source-code@0.0.1","maintainers":[{"name":"anubra266","email":"anubra266@gmail.com"}],"homepage":"https://github.com/anubra266/remark-source-code#readme","bugs":{"url":"https://github.com/anubra266/remark-source-code/issues"},"dist":{"shasum":"b4ae53bfb7344d8d770293b3f0df2506691f571c","tarball":"https://registry.npmjs.org/remark-source-code/-/remark-source-code-0.0.1.tgz","fileCount":5,"integrity":"sha512-xeaTnosY268zJ2yKF96T8iOd0ZYuYJ09/SFNyR4YbqquMaNE2jcLNkn3cC57Cn4KEN+XL3j3BQ/YjyUVanZ+Ug==","signatures":[{"sig":"MEYCIQCzFdSXLlVIYxwtjolBvd0WlWO9xmbct9mW6RsFUrv+6wIhAKPUErJ5Fcymk2ndKxcAk5xp6gmXQxd9wZ6Vs5DhGmNQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6285},"main":"index.js","type":"module","types":"index.d.ts","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"gitHead":"79368f611ac9e346a9f58a1ff37a68ec0e0a7a07","scripts":{"test":"tap -Rspec --cov test.js","build":"tsc","report":"nyc report --reporter=text-lcov | coveralls","prepare":"npm run build"},"_npmUser":{"name":"anubra266","email":"anubra266@gmail.com"},"repository":{"url":"git+https://github.com/anubra266/remark-source-code.git","type":"git"},"_npmVersion":"10.8.1","description":"Import code from local files or remote URLs into your markdown","directories":{},"sideEffects":false,"_nodeVersion":"20.16.0","dependencies":{"node-fetch":"^3.3.2","unist-util-visit":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.1.0","remark":"^14.0.1","typescript":"^5.7.2","@types/node":"^22.10.1","@types/mdast":"^4.0.4","coveralls-next":"^4.1.2"},"_npmOperationalInternal":{"tmp":"tmp/remark-source-code_0.0.1_1745018829369_0.32608600589140835","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"remark-source-code","version":"0.0.3","description":"Import code from local files or remote URLs into your markdown","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"type":"module","main":"index.js","types":"index.d.ts","sideEffects":false,"scripts":{"build":"tsc","test":"tap -Rspec --cov test.js","report":"nyc report --reporter=text-lcov | coveralls","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/anubra266/remark-source-code.git"},"keywords":["mdast","remark","plugin","mdast-plugin","remark-plugin","source-code","code-import"],"author":{"name":"anubra266"},"license":"MIT","dependencies":{"node-fetch":"^3.3.2","unist-util-visit":"^5.0.0"},"devDependencies":{"@types/mdast":"^4.0.4","@types/node":"^22.10.1","coveralls-next":"^4.1.2","remark":"^14.0.1","tap":"^16.1.0","typescript":"^5.7.2"},"_id":"remark-source-code@0.0.3","gitHead":"bde9bf9a20bac428728f53c1c48830eadb3e3f9b","bugs":{"url":"https://github.com/anubra266/remark-source-code/issues"},"homepage":"https://github.com/anubra266/remark-source-code#readme","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-wrhlCeUpYG+uEeqtUfkjqnHxH4fDURFTlzNojXyqL5a7+exf7o4+e7LY+rUgFYgx9/BYsVx2f8JoeH2ApMd2dg==","shasum":"00949e4bdf7bfd0e0f0dfac212cbd69f6dcf0137","tarball":"https://registry.npmjs.org/remark-source-code/-/remark-source-code-0.0.3.tgz","fileCount":5,"unpackedSize":6289,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCeMc110NPQsVAA84/qdOOUZZfaLnMxCnx/yicIIf2u5AIgDkN0MLZQMNvmxaPh2EoBCyNWxgNhfGqrzTDr5KaCzu4="}]},"_npmUser":{"name":"anubra266","email":"anubra266@gmail.com"},"directories":{},"maintainers":[{"name":"anubra266","email":"anubra266@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/remark-source-code_0.0.3_1745019125159_0.8570541553480571"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-18T23:27:09.368Z","modified":"2025-04-18T23:32:05.558Z","0.0.1":"2025-04-18T23:27:09.557Z","0.0.3":"2025-04-18T23:32:05.387Z"},"bugs":{"url":"https://github.com/anubra266/remark-source-code/issues"},"author":{"name":"anubra266"},"license":"MIT","homepage":"https://github.com/anubra266/remark-source-code#readme","keywords":["mdast","remark","plugin","mdast-plugin","remark-plugin","source-code","code-import"],"repository":{"type":"git","url":"git+https://github.com/anubra266/remark-source-code.git"},"description":"Import code from local files or remote URLs into your markdown","maintainers":[{"name":"anubra266","email":"anubra266@gmail.com"}],"readme":"# remark-source-code\n\n[![npm version](https://badge.fury.io/js/remark-source-code.svg)](https://badge.fury.io/js/remark-source-code)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA remark plugin to import code from local files or remote URLs into your markdown.\n\n## Installation\n\n```bash\nnpm install remark-source-code\n```\n\n## Usage\n\n```js\nimport {remark} from 'remark';\nimport remarkSourceCode from 'remark-source-code';\n\nconst file = await remark().use(remarkSourceCode, {baseDir: './src'}).process(`\n\\`\\`\\`js src=\"example.js\"\n\\`\\`\\`\n\n\\`\\`\\`js src=\"https://example.com/remote.js\"\n\\`\\`\\`\n`);\n```\n\n## API\n\n### `remarkSourceCode(options?)`\n\n#### `options`\n\nType: `object`\n\n##### `baseDir`\n\nType: `string`\nDefault: `process.cwd()`\n\nBase directory for resolving local file paths.\n\n## Examples\n\n### Local Files\n\n```markdown\n\\`\\`\\`js src=\"path/to/file.js\"\n\\`\\`\\`\n```\n\n### Remote URLs\n\n```markdown\n\\`\\`\\`js src=\"https://example.com/code.js\"\n\\`\\`\\`\n```\n\n### With Language and Other Meta\n\n```markdown\n\\`\\`\\`js src=\"example.js\" title=\"Example Code\"\n\\`\\`\\`\n```\n\n## Sponsors\n\nThanks goes to these wonderful people\n\n<p align=\"center\">\n  <a href=\"https://patreon.com/anubra266?utm_medium=clipboard_copy&utm_source=copyLink&\n  utm_campaign=creatorshare_creator&utm_content=join_link\">\n    <img src='https://cdn.jsdelivr.net/gh/anubra266/static@main/sponsors.svg'/>\n  </a>\n</p>\n\n## License\n\nMIT © [anubra266](https://github.com/anubra266)\n","readmeFilename":"readme.md"}