{"_id":"@asafarim/md-exporter","_rev":"3-bbacdb5e7da529d751237d823c545016","name":"@asafarim/md-exporter","dist-tags":{"latest":"0.2.3"},"versions":{"0.1.0":{"name":"@asafarim/md-exporter","version":"0.1.0","keywords":["asafarim","Markdown","folder","folder structure","CLI tool","cross-platform","code block"],"author":{"name":"Asafarim"},"license":"MIT","_id":"@asafarim/md-exporter@0.1.0","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://github.com/AliSafari-IT/md-exporter","bugs":{"url":"https://github.com/AliSafari-IT/md-exporter/issues"},"bin":{"md-exporter":"dist/cli.js"},"dist":{"shasum":"6ba8475dfe8cd819313227ddf73dca688c92630e","tarball":"https://registry.npmjs.org/@asafarim/md-exporter/-/md-exporter-0.1.0.tgz","fileCount":8,"integrity":"sha512-A+UoKhG9JEI2q2oh6oxytTFK7tUXWhQ2OdrwHl5q/viJa1h6iqSKW6xp/Du1hezrB2osgKC2yPjvVzR/ss3EkA==","signatures":[{"sig":"MEUCIQD2Q2DrrtJ9/R1VhfEr1FeNjFNHV/ItjPsi92qYgiANrwIgIFGMHQQwaNkLKdETNomieH3TzsOZ1eid7ZH6lkc1CbI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18984},"main":"./dist/index.js","type":"module","_from":"file:asafarim-md-exporter-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":"./dist/index.js"},"scripts":{"build":"tsup"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"_resolved":"C:\\Users\\User\\AppData\\Local\\Temp\\f8bf53ff77d03ba74516bed6d962d59b\\asafarim-md-exporter-0.1.0.tgz","_integrity":"sha512-A+UoKhG9JEI2q2oh6oxytTFK7tUXWhQ2OdrwHl5q/viJa1h6iqSKW6xp/Du1hezrB2osgKC2yPjvVzR/ss3EkA==","repository":{"url":"git+https://github.com/AliSafari-IT/md-exporter.git","type":"git"},"_npmVersion":"10.9.3","description":"Export files from a target folder into a single Markdown file","directories":{},"_nodeVersion":"22.20.0","dependencies":{"prettier":"^3.1.1","commander":"^11.1.0","fast-glob":"^3.3.2","isbinaryfile":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3","@types/node":"^20.10.6"},"_npmOperationalInternal":{"tmp":"tmp/md-exporter_0.1.0_1767301139457_0.41874761982312125","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@asafarim/md-exporter","version":"0.2.1","keywords":["asafarim","Markdown","folder","folder structure","CLI tool","cross-platform","code block"],"author":{"name":"Asafarim"},"license":"MIT","_id":"@asafarim/md-exporter@0.2.1","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://github.com/AliSafari-IT/md-exporter","bugs":{"url":"https://github.com/AliSafari-IT/md-exporter/issues"},"bin":{"md-exporter":"dist/cli.js"},"dist":{"shasum":"ec8fcb576e8afa2760607335678d621cadbff110","tarball":"https://registry.npmjs.org/@asafarim/md-exporter/-/md-exporter-0.2.1.tgz","fileCount":8,"integrity":"sha512-pg4jTifkHB6zbjWL7XZmtTA0Rh1PjcsfXzjyVI75s7U/hVMV0pJglO7UsF64YpXV6u2eDP5qO/dzGFDehU6sWg==","signatures":[{"sig":"MEUCIQD7JXMjH345kh5KjRgggOMbYso+su9nYkhtlKzgdRCLJQIgap74Fa9XWWiTxCTB28dBnbuFjE41LcHqFNUPw5JW3Kw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19822},"main":"./dist/index.js","type":"module","_from":"file:asafarim-md-exporter-0.2.1.tgz","types":"./dist/index.d.ts","exports":{".":"./dist/index.js"},"scripts":{"build":"tsup","version":"git commit -m \"chore: bump version to v%s\" && git push","preversion":"pnpm build && git add .","postversion":"npm publish"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"_resolved":"/tmp/b6011cbe5339a62762efb7470e5a250f/asafarim-md-exporter-0.2.1.tgz","_integrity":"sha512-pg4jTifkHB6zbjWL7XZmtTA0Rh1PjcsfXzjyVI75s7U/hVMV0pJglO7UsF64YpXV6u2eDP5qO/dzGFDehU6sWg==","repository":{"url":"git+https://github.com/AliSafari-IT/md-exporter.git","type":"git"},"_npmVersion":"10.8.2","description":"Export files from a target folder into a single Markdown file","directories":{},"_nodeVersion":"20.19.6","dependencies":{"prettier":"^3.1.1","commander":"^11.1.0","fast-glob":"^3.3.2","isbinaryfile":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3","@types/node":"^20.10.6"},"_npmOperationalInternal":{"tmp":"tmp/md-exporter_0.2.1_1767303349421_0.043190419278488434","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@asafarim/md-exporter","version":"0.2.3","description":"Export files from a target folder into a single Markdown file","type":"module","main":"./dist/index.js","bin":{"md-exporter":"dist/cli.js"},"exports":{".":"./dist/index.js"},"scripts":{"build":"tsup","prepublishOnly":"pnpm build","preversion":"pnpm build && git add .","version":"git commit -m \"chore: bump version to v%s\" && git push","postversion":"npm publish"},"dependencies":{"commander":"^11.1.0","fast-glob":"^3.3.2","prettier":"^3.1.1","isbinaryfile":"^5.0.0"},"devDependencies":{"@types/node":"^20.10.6","tsup":"^8.0.2","typescript":"^5.3.3"},"author":{"name":"Asafarim"},"license":"MIT","homepage":"https://github.com/AliSafari-IT/md-exporter","repository":{"type":"git","url":"git+https://github.com/AliSafari-IT/md-exporter.git"},"publishConfig":{"access":"public"},"keywords":["asafarim","Markdown","folder","folder structure","CLI tool","cross-platform","code block"],"_id":"@asafarim/md-exporter@0.2.3","gitHead":"a7d97098ea2fa3ca65a38f00ee186de105ebde64","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/AliSafari-IT/md-exporter/issues"},"_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-9nb4w2CcA3Xmh2Vhm1hV/athwIv1LJtY0h14cdbMKnyXQB9RLFQOPmHc6j6c4U3SXhLEAGI3V2+KW4LCaeYpaA==","shasum":"c03e8d8c392c57d4d27eb4cad1202ed48779f11a","tarball":"https://registry.npmjs.org/@asafarim/md-exporter/-/md-exporter-0.2.3.tgz","fileCount":8,"unpackedSize":20124,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHdEsGtGcLwdSk+yMuzrUKwBcXcDcMAWMgEVIvYlYsKJAiEA7I9C8dedbGO3PKqx7qWxWfa8BYpe1Hu2gak72TAHyZk="}]},"_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-exporter_0.2.3_1767303857607_0.3917387018043599"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-01T20:58:59.388Z","modified":"2026-01-01T21:44:17.974Z","0.1.0":"2026-01-01T20:58:59.618Z","0.2.1":"2026-01-01T21:35:49.560Z","0.2.3":"2026-01-01T21:44:17.746Z"},"bugs":{"url":"https://github.com/AliSafari-IT/md-exporter/issues"},"author":{"name":"Asafarim"},"license":"MIT","homepage":"https://github.com/AliSafari-IT/md-exporter","keywords":["asafarim","Markdown","folder","folder structure","CLI tool","cross-platform","code block"],"repository":{"type":"git","url":"git+https://github.com/AliSafari-IT/md-exporter.git"},"description":"Export files from a target folder into a single Markdown file","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"readme":"# md-exporter\r\n\r\nA cross-platform CLI tool that exports files from a target folder into a single Markdown file with per-file headers and fenced code blocks.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install -g @asafarim/md-exporter\r\n# or\r\npnpm add -g @asafarim/md-exporter\r\n```\r\n\r\n## Quick Start\r\n\r\nAfter installation, you can use the CLI directly on your local machine to export any folder:\r\n\r\n```bash\r\nmd-exporter D:\\your\\folder\\path --filter all --out-dir ./exports\r\n```\r\n\r\nThe tool runs **locally on your machine** and has full access to your file system. All file paths are resolved relative to your current working directory or as absolute paths.\r\n\r\n## Built-in Help\r\n\r\nUse the built-in help command to see all available options:\r\n\r\n```bash\r\n# Show help\r\nmd-exporter --help\r\n\r\n# Show version\r\nmd-exporter --version\r\n```\r\n\r\nThe help command displays all available options with descriptions and examples.\r\n\r\n## Testing During Development\r\n\r\nIf you're developing or testing the package locally:\r\n\r\n```bash\r\n# Install globally from local package\r\ncd D:\\repos\\npm-packages\\packages\\md-exporter\r\nnpm install -g .\r\n\r\n# Or use npx without global install\r\nnpx . --help\r\n\r\n# Or run directly\r\nnode dist/cli.js --help\r\n\r\n# Or use npm link for development\r\nnpm link\r\n```\r\n\r\n## Usage\r\n\r\n```bash\r\nmd-exporter <targetPath> [options]\r\n```\r\n\r\n### Options\r\n\r\n- `--filter <all|tsx|css|md|json|glob>` - File filter type (default: all)\r\n- `--pattern <glob>` - Glob pattern (required when filter=glob)\r\n- `--exclude <csv>` - Comma-separated directory exclusions (default: \"node_modules,.git,dist\")\r\n- `--max-size <mb>` - Maximum file size in MB (default: 5)\r\n- `--follow-symlinks` - Follow symbolic links (default: false)\r\n- `--dry-run` - Perform a dry run without writing output (default: false)\r\n- `--verbose` - Enable verbose logging (default: false)\r\n- `--out-dir <path>` - Output directory (default: current working directory)\r\n- `--eol <lf|crlf>` - End-of-line style (default: lf)\r\n- `--report-json <path>` - Write JSON metrics report to specified path\r\n- `--no-prettier` - Skip Prettier formatting\r\n\r\n## Examples\r\n\r\n### Export all TypeScript files from a folder\r\n\r\n```bash\r\nmd-exporter ./src --filter tsx --out-dir ./exports\r\n```\r\n\r\n### Export all JSON files from a folder\r\n\r\n```bash\r\nmd-exporter ./src --filter json --out-dir ./exports\r\n```\r\n\r\n### Export with custom glob pattern\r\n\r\n```bash\r\nmd-exporter D:\\my-project\\src --filter glob --pattern \"**/*.{ts,tsx,js}\" --out-dir ./exports\r\n```\r\n\r\n### Export with exclusions\r\n\r\n```bash\r\nmd-exporter ./src --filter all --exclude \"node_modules,.git,dist,build\" --out-dir ./exports\r\n```\r\n\r\n### Dry run (preview without writing)\r\n\r\n```bash\r\nmd-exporter ./src --dry-run --verbose\r\n```\r\n\r\n## Programmatic API\r\n\r\nUse the library in your Node.js/TypeScript projects:\r\n\r\n```typescript\r\nimport { runExport } from '@asafarim/md-exporter';\r\n\r\nconst result = await runExport({\r\n  targetPath: './src',\r\n  filter: 'tsx',\r\n  exclude: ['node_modules', '.git'],\r\n  maxSize: 5,\r\n  outDir: './exports',\r\n  dryRun: false,\r\n  verbose: true\r\n});\r\n\r\nconsole.log(result.report);\r\n```\r\n\r\n## Important: Local vs. Server Usage\r\n\r\n### Local CLI (Recommended)\r\n\r\nWhen you install and run `md-exporter` as a CLI tool, it runs **directly on your machine** with full access to your local file system. You can export any folder path:\r\n\r\n```bash\r\n# Windows\r\nmd-exporter D:\\Users\\YourName\\Documents\\MyProject\\src\r\n\r\n# macOS/Linux\r\nmd-exporter /Users/yourname/Documents/MyProject/src\r\n```\r\n\r\n### Web Demo (Development Only)\r\n\r\nThe included React demo app with a Node.js server is for **demonstration purposes only**. It requires:\r\n\r\n1. The server running on your local machine\r\n2. The server having access to your local file system\r\n3. Both web UI and server running simultaneously\r\n\r\nThe demo is useful for testing and visualization, but for production use, **use the CLI directly on your machine** where you need to export files.\r\n\r\n## Output\r\n\r\nThe tool generates a Markdown file with:\r\n- Timestamp-based filename: `YYYYMMDD_HHMMSS_{filter}.md`\r\n- Per-file headers: `file {absolute-path}:`\r\n- Syntax-highlighted code blocks with language tags\r\n- Optional JSON report with metrics and timings\r\n\r\n## Publishing\r\n\r\nThis package is set up for automated publishing to NPM:\r\n\r\n### Local Version Bump & Publish\r\n\r\n```bash\r\n# Bump version and publish automatically\r\nnpm version patch  # or minor, major\r\n```\r\n\r\nThis will:\r\n1. Build the package\r\n2. Update version in package.json\r\n3. Commit the version change\r\n4. Push to GitHub\r\n5. Publish to NPM\r\n\r\n### GitHub Actions\r\n\r\nThe package also uses GitHub Actions for automatic publishing when tags are pushed:\r\n\r\n```bash\r\n# Create and push a tag to trigger publishing\r\ngit tag v0.2.0\r\ngit push origin v0.2.0\r\n```\r\n\r\n**Setup Required:**\r\n- Add `NPM_TOKEN` to GitHub repository secrets\r\n- Ensure you have publish access to the `@asafarim/md-exporter` package\r\n","readmeFilename":"README.md"}