{"_id":"@asafarim/md-file-explorer","_rev":"7-389a421c07ad4b09563d489e2b910343","name":"@asafarim/md-file-explorer","dist-tags":{"latest":"1.2.4"},"versions":{"1.0.1":{"name":"@asafarim/md-file-explorer","version":"1.0.1","keywords":["markdown","file-explorer","lazy-loading","typescript","filesystem","documentation","tree-view"],"author":{"name":"Ali Safari"},"license":"MIT","_id":"@asafarim/md-file-explorer@1.0.1","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://alisafari-it.github.io/md-file-explorer","bugs":{"url":"https://github.com/AliSafari-IT/md-file-explorer/issues"},"dist":{"shasum":"be1b80753efadb8b0bf4299590e954a4daa56748","tarball":"https://registry.npmjs.org/@asafarim/md-file-explorer/-/md-file-explorer-1.0.1.tgz","fileCount":100,"integrity":"sha512-H20+c80lfqFdS5WETtGL0wORXwZEZxaNNFVtg74mRlh56c4Ro1Hbfwx+KpSs3VMmYeqNfjGuqoBlvqMt20A3PQ==","signatures":[{"sig":"MEUCIQDGzPlPVHbY1coLxU0mymgWz8HNp9TrqGd7XZs4dS065wIgPeKAF2mpcFz816oK8bj6rXBDoScufwT5rpLGp93Fjfk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4592188},"main":"dist/index.js","type":"module","_from":"file:asafarim-md-file-explorer-1.0.1.tgz","types":"dist/index.d.ts","module":"dist/index.js","funding":{"url":"https://github.com/sponsors/AliSafari-IT"},"scripts":{"all":"pnpm i && pnpm run build","dev":"rollup -c -w","demo":"pnpm build && cd demo && pnpm run build && pnpm dev","test":"jest","build":"rollup -c","clean":"rimraf dist"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"_resolved":"C:\\Users\\User\\AppData\\Local\\Temp\\ad6f772abc40a32e3662b08966518e6d\\asafarim-md-file-explorer-1.0.1.tgz","_integrity":"sha512-H20+c80lfqFdS5WETtGL0wORXwZEZxaNNFVtg74mRlh56c4Ro1Hbfwx+KpSs3VMmYeqNfjGuqoBlvqMt20A3PQ==","repository":{"url":"git+https://github.com/AliSafari-IT/md-file-explorer.git","type":"git"},"_npmVersion":"11.4.2","description":"A TypeScript package for recursively exploring markdown files and folders with lazy loading capabilities","directories":{},"_nodeVersion":"20.18.3","dependencies":{"chokidar":"^3.5.3","gray-matter":"^4.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","rollup":"^3.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^11.0.0","@rollup/plugin-node-resolve":"^15.0.0"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/md-file-explorer_1.0.1_1752585074380_0.4090496125522973","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@asafarim/md-file-explorer","version":"1.1.1","keywords":["markdown","file-explorer","lazy-loading","typescript","filesystem","documentation","tree-view"],"author":"Ali Safari","license":"MIT","_id":"@asafarim/md-file-explorer@1.1.1","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://alisafari-it.github.io/md-file-explorer","bugs":{"url":"https://github.com/AliSafari-IT/md-file-explorer/issues"},"dist":{"shasum":"90002d2912a78e51680583548158c77849336f46","tarball":"https://registry.npmjs.org/@asafarim/md-file-explorer/-/md-file-explorer-1.1.1.tgz","fileCount":91,"integrity":"sha512-rBtWHE1wZddDIM5fG1+1cxD7MDjv/AvrV7rgwddYUeZ7ldr5VUg53G/LmwnkAVdWEPz3qkBGQndfyrwhEqUErQ==","signatures":[{"sig":"MEUCIQDhr40RZ0Qlb6v7XOG2N3qN8snVEiNFwSHSik3zcgtalQIgE3hBPq5fc1Ds1rRJjgGIbQhD1JA5Z9s6DgKltiu5pSo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3057379},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","funding":{"url":"https://github.com/sponsors/AliSafari-IT"},"scripts":{"all":"pnpm install && pnpm run build","dev":"npx kill-port 3106 && pnpm run clean && pnpm run build && cd demo && pnpm run dev","demo":"pnpm build && cd demo && pnpm run build && pnpm dev","test":"jest","build":"rollup -c","clean":"rimraf dist","deploy:pages":"pnpm run build && cd demo && pnpm run build"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"repository":{"url":"https://github.com/AliSafari-IT/md-file-explorer.git","type":"git"},"description":"A TypeScript package for recursively exploring markdown files and folders with lazy loading capabilities","directories":{},"_nodeVersion":"24.13.0","dependencies":{"chokidar":"^3.5.3","gray-matter":"^4.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.0","rimraf":"^5.0.0","rollup":"^3.0.0","kill-port":"^2.0.1","typescript":"^5.9.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^12.0.0","@rollup/plugin-node-resolve":"^15.0.0"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/md-file-explorer_1.1.1_1785542447004_0.8674622316954061","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@asafarim/md-file-explorer","version":"1.2.0","keywords":["markdown","file-explorer","lazy-loading","typescript","filesystem","documentation","tree-view"],"author":"Ali Safari","license":"MIT","_id":"@asafarim/md-file-explorer@1.2.0","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://alisafari-it.github.io/md-file-explorer","bugs":{"url":"https://github.com/AliSafari-IT/md-file-explorer/issues"},"dist":{"shasum":"6662e90d2528cba84f882809e3bbc4fde559d6fe","tarball":"https://registry.npmjs.org/@asafarim/md-file-explorer/-/md-file-explorer-1.2.0.tgz","fileCount":104,"integrity":"sha512-/raI4WgRWicYgy199W9UVxASbA2ZSF3sNaP69lP8aBf7Y9n4g/KrwD5yKdWSU5g8rHIv64C6pE1I46PLQ3R+TQ==","signatures":[{"sig":"MEQCIHDFZg6rMw8OII2cp4mcuA9kxAyO+4Wn4FYApWRj98e6AiB3s9PA66sit3MT9+z+HVb6vznPuc5Uyhw61UM9CHkLlQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3913241},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","funding":{"url":"https://github.com/sponsors/AliSafari-IT"},"scripts":{"all":"pnpm install && pnpm run build","dev":"npx kill-port 3106 && pnpm run clean && pnpm run build && cd demo && pnpm run dev","demo":"pnpm build && cd demo && pnpm run build && pnpm dev","test":"jest","build":"rollup -c","clean":"rimraf dist","deploy:pages":"pnpm run build && cd demo && pnpm run build"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"repository":{"url":"https://github.com/AliSafari-IT/md-file-explorer.git","type":"git"},"description":"A TypeScript package for recursively exploring markdown files and folders with lazy loading capabilities","directories":{},"_nodeVersion":"24.13.0","dependencies":{"chokidar":"^3.5.3","gray-matter":"^4.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.0","rimraf":"^5.0.0","rollup":"^3.0.0","kill-port":"^2.0.1","typescript":"^5.9.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^12.0.0","@rollup/plugin-node-resolve":"^15.0.0"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/md-file-explorer_1.2.0_1785547298987_0.8389525272080707","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@asafarim/md-file-explorer","version":"1.2.1","keywords":["markdown","file-explorer","lazy-loading","typescript","filesystem","documentation","tree-view"],"author":"Ali Safari","license":"MIT","_id":"@asafarim/md-file-explorer@1.2.1","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://alisafari-it.github.io/md-file-explorer","bugs":{"url":"https://github.com/AliSafari-IT/md-file-explorer/issues"},"dist":{"shasum":"07e386a166f5585cf45876fe889761edd328e7d9","tarball":"https://registry.npmjs.org/@asafarim/md-file-explorer/-/md-file-explorer-1.2.1.tgz","fileCount":104,"integrity":"sha512-z9f7fyLqCjWMRW0xixBsjY5TPJHFl3/9lXsDsU6xB6kg6h8vXrAHdSCDDHj2vqNYcjUuIHUaVOR6c6RGDuP3Xg==","signatures":[{"sig":"MEYCIQCKd6Y4FwNQP5+pJ35xnzOrmIV8vl/qeOKmNKiyX8YrBwIhAJ1ZJQOTDgBbcdKYZW8O4aIaecpBjXyC7M9e5UoygeXT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3914671},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","funding":{"url":"https://github.com/sponsors/AliSafari-IT"},"scripts":{"all":"pnpm install && pnpm run build","dev":"npx kill-port 3106 && pnpm run clean && pnpm run build && cd demo && pnpm run dev","demo":"pnpm build && cd demo && pnpm run build && pnpm dev","test":"jest","build":"rollup -c","clean":"rimraf dist","deploy:pages":"pnpm run build && cd demo && pnpm run build"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"repository":{"url":"https://github.com/AliSafari-IT/md-file-explorer.git","type":"git"},"description":"A TypeScript package for recursively exploring markdown files and folders with lazy loading capabilities","directories":{},"_nodeVersion":"24.13.0","dependencies":{"chokidar":"^3.5.3","gray-matter":"^4.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.0","rimraf":"^5.0.0","rollup":"^3.0.0","kill-port":"^2.0.1","typescript":"^5.9.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^12.0.0","@rollup/plugin-node-resolve":"^15.0.0"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/md-file-explorer_1.2.1_1785547504569_0.0022408949709094017","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@asafarim/md-file-explorer","version":"1.2.2","keywords":["markdown","file-explorer","lazy-loading","typescript","filesystem","documentation","tree-view"],"author":{"name":"Ali Safari"},"license":"MIT","_id":"@asafarim/md-file-explorer@1.2.2","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://alisafari-it.github.io/md-file-explorer","bugs":{"url":"https://github.com/AliSafari-IT/md-file-explorer/issues"},"dist":{"shasum":"075d6ca3f7b95a1d4ba8f92ab26fbb61e2f002e9","tarball":"https://registry.npmjs.org/@asafarim/md-file-explorer/-/md-file-explorer-1.2.2.tgz","fileCount":69,"integrity":"sha512-7k5vJbIYnYXQ6OW1m2LNA87dHEe96Ai80tgtQjNzUXPsZ3e6hnmznkiEW6T7LGqFcjlmXfbJp1AhhweSEjxH5A==","signatures":[{"sig":"MEUCIGEQQfrnN3a3vzRG1KVwYk1lqSw1AqVZETsqOJmZjk+RAiEApzT1q9Irjusf6W1dxJIxnuQVSDkpREGSLFyC8MmQOd0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":280880},"main":"dist/index.js","type":"module","_from":"file:asafarim-md-file-explorer-1.2.2.tgz","types":"dist/index.d.ts","module":"dist/index.js","funding":{"url":"https://github.com/sponsors/AliSafari-IT"},"scripts":{"all":"pnpm install && pnpm run build","dev":"npx kill-port 3106 && pnpm run clean && pnpm run build && cd demo && pnpm run dev","demo":"pnpm build && cd demo && pnpm run build && pnpm dev","test":"jest","build":"rollup -c","clean":"rimraf dist","deploy:pages":"pnpm run build && cd demo && pnpm run build"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"_resolved":"/tmp/a06a4acdfc91caaa70014aa903f5f617/asafarim-md-file-explorer-1.2.2.tgz","_integrity":"sha512-7k5vJbIYnYXQ6OW1m2LNA87dHEe96Ai80tgtQjNzUXPsZ3e6hnmznkiEW6T7LGqFcjlmXfbJp1AhhweSEjxH5A==","repository":{"url":"git+https://github.com/AliSafari-IT/md-file-explorer.git","type":"git"},"_npmVersion":"10.8.2","description":"A TypeScript package for recursively exploring markdown files and folders with lazy loading capabilities","directories":{},"_nodeVersion":"20.20.2","dependencies":{"chokidar":"^3.5.3","gray-matter":"^4.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.0","rimraf":"^5.0.0","rollup":"^3.0.0","kill-port":"^2.0.1","typescript":"^5.9.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^12.0.0","@rollup/plugin-node-resolve":"^15.0.0"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/md-file-explorer_1.2.2_1785548148462_0.18711784529527198","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"@asafarim/md-file-explorer","version":"1.2.3","keywords":["markdown","file-explorer","lazy-loading","typescript","filesystem","documentation","tree-view"],"author":{"name":"Ali Safari"},"license":"MIT","_id":"@asafarim/md-file-explorer@1.2.3","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://alisafari-it.github.io/md-file-explorer","bugs":{"url":"https://github.com/AliSafari-IT/md-file-explorer/issues"},"dist":{"shasum":"829d2a24f707c26ac41b98dc2d68d528fb0ff3d1","tarball":"https://registry.npmjs.org/@asafarim/md-file-explorer/-/md-file-explorer-1.2.3.tgz","fileCount":69,"integrity":"sha512-TCRA/6EgJtvJk3ytmjl9xulG7p2m7I0X6ST9+nTxwkdkKqlRWrK1uDOZgwPQlx+ANNQf1s2Qf5FA+FN7JBnfgA==","signatures":[{"sig":"MEQCIF1qfXtLH1GT6WhZCPJXksnjUlpJdj1PjOUYYVBQt4AkAiAe4Ha0GHxzicZVl5b/TVwWTXx3CsgvjhyzpA1lVcV1Fg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":281070},"main":"dist/index.js","type":"module","_from":"file:asafarim-md-file-explorer-1.2.3.tgz","types":"dist/index.d.ts","module":"dist/index.js","funding":{"url":"https://github.com/sponsors/AliSafari-IT"},"scripts":{"all":"pnpm install && pnpm run build","dev":"npx kill-port 3106 && pnpm run clean && pnpm run build && cd demo && pnpm run dev","demo":"pnpm build && cd demo && pnpm run build && pnpm dev","test":"jest","build":"rollup -c","clean":"rimraf dist","deploy:pages":"pnpm run build && cd demo && pnpm run build"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"_resolved":"/tmp/7e2c4996b1017957e7467529ec7b0de1/asafarim-md-file-explorer-1.2.3.tgz","_integrity":"sha512-TCRA/6EgJtvJk3ytmjl9xulG7p2m7I0X6ST9+nTxwkdkKqlRWrK1uDOZgwPQlx+ANNQf1s2Qf5FA+FN7JBnfgA==","repository":{"url":"git+https://github.com/AliSafari-IT/md-file-explorer.git","type":"git"},"_npmVersion":"10.8.2","description":"A TypeScript package for recursively exploring markdown files and folders with lazy loading capabilities","directories":{},"_nodeVersion":"20.20.2","dependencies":{"chokidar":"^3.5.3","gray-matter":"^4.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.0","rimraf":"^5.0.0","rollup":"^3.0.0","kill-port":"^2.0.1","typescript":"^5.9.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^12.0.0","@rollup/plugin-node-resolve":"^15.0.0"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/md-file-explorer_1.2.3_1785548656511_0.4083406350054295","host":"s3://npm-registry-packages-npm-production"}},"1.2.4":{"name":"@asafarim/md-file-explorer","version":"1.2.4","description":"A TypeScript package for recursively exploring markdown files and folders with lazy loading capabilities","type":"module","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","keywords":["markdown","file-explorer","lazy-loading","typescript","filesystem","documentation","tree-view"],"author":{"name":"Ali Safari"},"license":"MIT","peerDependencies":{"react":">=16.8.0"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-node-resolve":"^15.0.0","@rollup/plugin-typescript":"^12.0.0","@types/node":"^20.0.0","rimraf":"^5.0.0","kill-port":"^2.0.1","rollup":"^3.0.0","rollup-plugin-dts":"^6.0.0","typescript":"^5.9.0","tslib":"^2.6.0"},"dependencies":{"chokidar":"^3.5.3","gray-matter":"^4.0.3"},"repository":{"type":"git","url":"git+https://github.com/AliSafari-IT/md-file-explorer.git"},"homepage":"https://alisafari-it.github.io/md-file-explorer","bugs":{"url":"https://github.com/AliSafari-IT/md-file-explorer/issues"},"funding":{"url":"https://github.com/sponsors/AliSafari-IT"},"publishConfig":{"access":"public"},"scripts":{"build":"rollup -c","dev":"npx kill-port 3106 && pnpm run clean && pnpm run build && cd demo && pnpm run dev","all":"pnpm install && pnpm run build","clean":"rimraf dist","demo":"pnpm build && cd demo && pnpm run build && pnpm dev","deploy:pages":"pnpm run build && cd demo && pnpm run build","test":"jest"},"_id":"@asafarim/md-file-explorer@1.2.4","_integrity":"sha512-C6eK5rQamtPZdMx3rpHwEvZULdfbJchMpQOKS70Eav86JmGxmSIA9YGlACsvjilaB6nl7Zi9dnweNUR7XbH0Cg==","_resolved":"/tmp/ad8ea4e2daccda78f63bbfa3654bd859/asafarim-md-file-explorer-1.2.4.tgz","_from":"file:asafarim-md-file-explorer-1.2.4.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-C6eK5rQamtPZdMx3rpHwEvZULdfbJchMpQOKS70Eav86JmGxmSIA9YGlACsvjilaB6nl7Zi9dnweNUR7XbH0Cg==","shasum":"354bfd1c28d3ab840a1d5b51a013a8f0fea9d5fb","tarball":"https://registry.npmjs.org/@asafarim/md-file-explorer/-/md-file-explorer-1.2.4.tgz","fileCount":69,"unpackedSize":281070,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCQqsO6wOur2LDZ+flyo8IMBj1dQCDBDR43Hr2g2WJNMQIhAPt1yLG4I+BgblLLzI837c9Ll+Pb+gx+QENwW84l+Yiz"}]},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"directories":{},"maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/md-file-explorer_1.2.4_1785549041303_0.04434399212776885"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-15T13:11:14.253Z","modified":"2026-08-01T01:50:41.557Z","1.0.1":"2025-07-15T13:11:14.655Z","1.1.1":"2026-08-01T00:00:47.209Z","1.2.0":"2026-08-01T01:21:39.219Z","1.2.1":"2026-08-01T01:25:04.741Z","1.2.2":"2026-08-01T01:35:48.621Z","1.2.3":"2026-08-01T01:44:16.681Z","1.2.4":"2026-08-01T01:50:41.425Z"},"bugs":{"url":"https://github.com/AliSafari-IT/md-file-explorer/issues"},"author":{"name":"Ali Safari"},"license":"MIT","homepage":"https://alisafari-it.github.io/md-file-explorer","keywords":["markdown","file-explorer","lazy-loading","typescript","filesystem","documentation","tree-view"],"repository":{"type":"git","url":"git+https://github.com/AliSafari-IT/md-file-explorer.git"},"description":"A TypeScript package for recursively exploring markdown files and folders with lazy loading capabilities","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"readme":"<div align=\"center\">\n\n<img src=\"demo/public/logo.svg\" alt=\"MD File Explorer\" width=\"120\" height=\"120\" />\n\n# @asafarim/md-file-explorer\n\n**A TypeScript library for recursively exploring markdown files and folders with lazy loading, file watching, full-text search, and metadata parsing.**\n\n[![npm version](https://img.shields.io/npm/v/@asafarim/md-file-explorer.svg)](https://www.npmjs.com/package/@asafarim/md-file-explorer)\n[![npm downloads](https://img.shields.io/npm/dm/@asafarim/md-file-explorer.svg)](https://www.npmjs.com/package/@asafarim/md-file-explorer)\n[![license](https://img.shields.io/npm/l/@asafarim/md-file-explorer.svg)](https://github.com/AliSafari-IT/md-file-explorer/blob/main/LICENSE)\n[![Live Demo](https://img.shields.io/badge/demo-live-brightgreen)](https://alisafari-it.github.io/md-file-explorer)\n\n[Live Demo](https://alisafari-it.github.io/md-file-explorer) · [Documentation](https://github.com/AliSafari-IT/md-file-explorer) · [Report Bug](https://github.com/AliSafari-IT/md-file-explorer/issues) · [Request Feature](https://github.com/AliSafari-IT/md-file-explorer/issues)\n\n</div>\n\n---\n\n## ✨ Features\n\n- **🚀 Lazy Loading** — Scan directories on-demand instead of loading everything upfront\n- **📁 Recursive Scanning** — Automatically discovers nested folders and markdown files\n- **🔍 Smart Filtering** — Include or exclude files based on extensions and glob patterns\n- **📝 Metadata Parsing** — Extracts YAML frontmatter from markdown files automatically\n- **👀 File Watching** — Get real-time notifications when files are added, changed, or removed\n- **🔎 Full-Text Search** — Search by filename or file content across your entire tree\n- **🎯 Fully Typed** — Written in TypeScript with comprehensive type definitions\n- **⚡ High Performance** — Only loads content when needed, with configurable depth limits\n\n## 📦 Installation\n\n```bash\n# npm\nnpm install @asafarim/md-file-explorer\n\n# yarn\nyarn add @asafarim/md-file-explorer\n\n# pnpm\npnpm add @asafarim/md-file-explorer\n```\n\n## 🚀 Quick Start\n\n```typescript\nimport { MdFileExplorer } from '@asafarim/md-file-explorer';\n\n// Create an explorer instance\nconst explorer = new MdFileExplorer('/path/to/docs', {\n  includeExtensions: ['.md', '.mdx'],\n  excludePatterns: ['node_modules', '.git'],\n  parseMarkdownMetadata: true,\n});\n\n// Get the file tree (lazy-loaded by default)\nconst fileTree = await explorer.getFileTree();\n\n// Read a specific file's content\nconst content = await explorer.getFileContent('guides/getting-started.md');\n\n// Scan an entire directory at once\nconst scanResult = await explorer.scanDirectory();\n```\n\n## 📖 API Reference\n\n### `MdFileExplorer`\n\nThe main class for exploring markdown files.\n\n#### Constructor\n\n```typescript\nnew MdFileExplorer(rootPath: string, options?: ExplorerOptions)\n```\n\n| Parameter   | Type              | Description                          |\n| ----------- | ----------------- | ------------------------------------ |\n| `rootPath`  | `string`          | Root directory to explore            |\n| `options`   | `ExplorerOptions` | Optional configuration (see below)   |\n\n#### Methods\n\n| Method                              | Returns                  | Description                                  |\n| ----------------------------------- | ------------------------ | -------------------------------------------- |\n| `scanDirectory(path?, options?)`    | `Promise<ScanResult>`    | Scan a directory and return the complete tree |\n| `getFileTree(path?, depth?)`        | `Promise<FileNode[]>`    | Get the file tree with an optional depth limit |\n| `getFileContent(filePath)`          | `Promise<FileContent>`   | Get the content of a specific file           |\n| `watchDirectory(callback)`          | `void`                   | Watch for file system changes in real-time   |\n| `stopWatching()`                    | `void`                   | Stop watching for file changes               |\n| `searchFiles(query, searchInContent?)` | `Promise<FileNode[]>` | Search for files by name or content          |\n| `searchFilesDetailed(query, searchInContent?)` | `Promise<SearchResult[]>` | Search and return match type + snippet   |\n| `fileExists(filePath)`              | `Promise<boolean>`       | Check if a file exists in the tree           |\n\n### Types\n\n#### `FileNode`\n\n```typescript\ninterface FileNode {\n  name: string;                        // File or folder name\n  path: string;                        // Relative path from root\n  type: 'folder' | 'file';             // Node type\n  children?: FileNode[];               // Child nodes (folders only)\n  lastModified?: Date;                 // Last modification date\n  size?: number;                       // File size in bytes\n  metadata?: MarkdownMetadata;         // Parsed frontmatter (if enabled)\n}\n```\n\n#### `ExplorerOptions`\n\n```typescript\ninterface ExplorerOptions {\n  rootPath: string;                    // Root directory path\n  includeExtensions?: string[];        // e.g. ['.md', '.mdx']\n  excludePatterns?: string[];          // e.g. ['node_modules', '.git']\n  maxDepth?: number;                   // Maximum scan depth (default: unlimited)\n  sortBy?: 'name' | 'date' | 'size';   // Sort criteria (default: 'name')\n  sortOrder?: 'asc' | 'desc';          // Sort direction (default: 'asc')\n  includeDotFiles?: boolean;           // Include hidden files (default: false)\n  parseMarkdownMetadata?: boolean;     // Parse YAML frontmatter (default: false)\n}\n```\n\n#### `MarkdownMetadata`\n\n```typescript\ninterface MarkdownMetadata {\n  title?: string;\n  description?: string;\n  tags?: string[];\n  [key: string]: unknown;              // Any additional frontmatter fields\n}\n```\n\n#### `ScanResult`\n\n```typescript\ninterface ScanResult {\n  rootPath: string;\n  nodes: FileNode[];\n  totalFiles: number;\n  totalFolders: number;\n  totalSize: number;\n}\n```\n\n#### `SearchResult`\n\n```typescript\ninterface SearchResult {\n  node: FileNode;                              // The matched file node\n  matchType: 'name' | 'metadata' | 'content';  // Where the match was found\n  snippet?: string;                            // Excerpt around the match (content matches only)\n}\n```\n\n### Utilities\n\nThe package also exports these helper functions:\n\n```typescript\nimport {\n  normalizePath,\n  isValidMarkdownFile,\n  shouldExcludePath,\n  getFileStats,\n  parseMarkdownMetadata,\n  sortFileNodes,\n  createFileNode,\n  getRelativePath,\n} from '@asafarim/md-file-explorer';\n```\n\n## 💡 Examples\n\n### Lazy Loading with Depth Control\n\nOnly load what you need — great for large documentation trees:\n\n```typescript\nconst explorer = new MdFileExplorer('/docs');\n\n// Get only top-level folders and files\nconst topLevel = await explorer.getFileTree('/', 1);\n\n// Load contents of a specific folder (2 levels deep)\nconst packageDocs = await explorer.getFileTree('/packages', 2);\n```\n\n### Real-Time File Watching\n\nReact to file changes as they happen:\n\n```typescript\nexplorer.watchDirectory((event, path) => {\n  console.log(`File ${event}: ${path}`);\n  // Events: 'add' | 'change' | 'unlink' | 'addDir' | 'unlinkDir'\n});\n\n// Stop watching when done\nexplorer.stopWatching();\n```\n\n### Searching Files\n\nFind files by name, metadata, or search inside their content:\n\n```typescript\n// Search by filename only — fast\nconst byName = await explorer.searchFiles('react');\n\n// Search inside file contents too — thorough\nconst byContent = await explorer.searchFiles('useState', true);\n\n// Get detailed results with match type and snippets\nconst detailed = await explorer.searchFilesDetailed('hooks', true);\ndetailed.forEach(result => {\n  console.log(result.matchType);  // 'name' | 'metadata' | 'content'\n  console.log(result.node.path);  // file path\n  console.log(result.snippet);    // excerpt around the match (content matches)\n});\n```\n\n### Custom Configuration\n\nFine-tune the explorer for your project:\n\n```typescript\nconst explorer = new MdFileExplorer('/docs', {\n  includeExtensions: ['.md', '.mdx', '.txt'],\n  excludePatterns: ['draft-*', 'temp/**', 'private/'],\n  maxDepth: 5,\n  sortBy: 'date',\n  sortOrder: 'desc',\n  includeDotFiles: false,\n  parseMarkdownMetadata: true,\n});\n```\n\n## 🔗 Integration Examples\n\n### Express API Server\n\n```typescript\nimport express from 'express';\nimport { MdFileExplorer } from '@asafarim/md-file-explorer';\n\nconst app = express();\nconst explorer = new MdFileExplorer('./docs');\n\n// Serve the file tree\napp.get('/api/docs/tree', async (req, res) => {\n  const { path, depth } = req.query;\n  const tree = await explorer.getFileTree(path as string, Number(depth) || 1);\n  res.json(tree);\n});\n\n// Serve file content\napp.get('/api/docs/file', async (req, res) => {\n  const { path } = req.query;\n  try {\n    const content = await explorer.getFileContent(path as string);\n    res.json(content);\n  } catch {\n    res.status(404).json({ error: 'File not found' });\n  }\n});\n\n// Search files (returns detailed results with match type and snippets)\napp.get('/api/docs/search', async (req, res) => {\n  const { q, content } = req.query;\n  const results = await explorer.searchFilesDetailed(q as string, content === 'true');\n  res.json(results);\n});\n\napp.listen(3000);\n```\n\n### React Component\n\n```tsx\nimport React, { useState, useEffect } from 'react';\nimport { MdFileExplorer, FileNode } from '@asafarim/md-file-explorer';\n\nfunction DocumentationExplorer() {\n  const [explorer] = useState(() => new MdFileExplorer('./docs'));\n  const [fileTree, setFileTree] = useState<FileNode[]>([]);\n\n  useEffect(() => {\n    const loadTree = async () => {\n      const tree = await explorer.getFileTree();\n      setFileTree(tree);\n    };\n\n    loadTree();\n\n    // Auto-refresh on file changes\n    explorer.watchDirectory(() => loadTree());\n\n    return () => explorer.stopWatching();\n  }, [explorer]);\n\n  return (\n    <ul>\n      {fileTree.map(node => (\n        <li key={node.path}>{node.name}</li>\n      ))}\n    </ul>\n  );\n}\n```\n\n## 📂 Recommended Project Structure\n\nThe package works best with organized documentation:\n\n```\ndocs/\n├── README.md\n├── guides/\n│   ├── getting-started.md\n│   └── advanced-usage.md\n├── api/\n│   ├── overview.md\n│   └── reference/\n│       ├── classes.md\n│       └── interfaces.md\n└── examples/\n    └── basic-usage.md\n```\n\n## ⚡ Performance Tips\n\n- **Use depth limits** — Pass a `depth` argument to `getFileTree()` to avoid scanning huge trees\n- **Exclude wisely** — Always exclude `node_modules`, `.git`, and build output directories\n- **Watch sparingly** — Only enable file watching in development or preview environments\n- **Cache content** — Cache results of `getFileContent()` for frequently accessed files\n- **Sort strategically** — Sorting by `date` is useful for blogs; `name` is best for docs\n- **Content search is slower** — `searchFiles(query, true)` reads every file; use it only when filename search isn't enough\n\n## 🛠️ Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Build the library\npnpm build\n\n# Run the demo locally (builds library first, then starts Vite dev server on port 3106)\npnpm dev\n\n# Run tests\npnpm test\n\n# Publish to npm (bumps version first, then publishes and pushes tags)\nnpm version minor && pnpm publish\n```\n\nThe demo app includes a **dark mode** that automatically follows your system's `prefers-color-scheme` setting, with all colors driven by CSS custom properties for seamless light/dark switching.\n\n## 🤝 Contributing\n\nContributions are welcome! Here's how to get started:\n\n1. **Fork** the repository\n2. **Clone** your fork: `git clone https://github.com/AliSafari-IT/md-file-explorer.git`\n3. **Install** dependencies: `pnpm install`\n4. **Build** the package: `pnpm build`\n5. **Make** your changes and test with the demo: `pnpm dev`\n6. **Submit** a pull request\n\n## 📄 License\n\nMIT License — see [LICENSE](https://github.com/AliSafari-IT/md-file-explorer/blob/main/LICENSE) for details.\n\n## 🔗 Links\n\n- **npm**: [npmjs.com/package/@asafarim/md-file-explorer](https://www.npmjs.com/package/@asafarim/md-file-explorer)\n- **GitHub**: [github.com/AliSafari-IT/md-file-explorer](https://github.com/AliSafari-IT/md-file-explorer)\n- **Live Demo**: [alisafari-it.github.io/md-file-explorer](https://alisafari-it.github.io/md-file-explorer)\n- **Issues**: [github.com/AliSafari-IT/md-file-explorer/issues](https://github.com/AliSafari-IT/md-file-explorer/issues)\n\n---\n\n<div align=\"center\">\n\nMade with ❤️ by [Ali Safari](https://github.com/AliSafari-IT)\n\n</div>\n","readmeFilename":"README.md"}