{"_id":"@diamondjs/parcel-transformer-diamond","_rev":"2-859602b9aff68cd506b16c5e53283f88","name":"@diamondjs/parcel-transformer-diamond","dist-tags":{"latest":"2.2.3"},"versions":{"2.2.2":{"name":"@diamondjs/parcel-transformer-diamond","version":"2.2.2","keywords":["parcel","parcel-plugin","parcel-transformer","diamondjs"],"license":"MIT","_id":"@diamondjs/parcel-transformer-diamond@2.2.2","maintainers":[{"name":"jhacobian","email":"joehacobian@gmail.com"}],"homepage":"https://github.com/Node0/diamondjs#readme","bugs":{"url":"https://github.com/Node0/diamondjs/issues"},"dist":{"shasum":"c4bb6ee0dd31a19563a73a2eb97c9ab55c1628fe","tarball":"https://registry.npmjs.org/@diamondjs/parcel-transformer-diamond/-/parcel-transformer-diamond-2.2.2.tgz","fileCount":5,"integrity":"sha512-MAcVbh20iDkjmLxO1FG7O6K2FpJ5gAacphZ4LuEJ+V7ceP71JXIIRVrQjkjxvvALZt6/bsRLQ3U/lg2ZTBt39g==","signatures":[{"sig":"MEUCIQC8SQRRv/0LQzenSMJAkTyYKsTqaLIsc1ApJaoNfO5d8wIge1rIYhEc6lKEtRG36uRnGfUGjU01IfYoLuwFVNPZWTU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12433},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"parcel":"2.x"},"gitHead":"431d824baa7b13459f8d9431b5122432ec52f741","scripts":{"dev":"tsup src/index.ts --format cjs --dts --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup src/index.ts --format cjs --dts --clean","clean":"rm -rf dist","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"jhacobian","email":"joehacobian@gmail.com"},"repository":{"url":"git+https://github.com/Node0/diamondjs.git","type":"git","directory":"packages/parcel-plugin"},"_npmVersion":"10.8.2","description":"Parcel 2 transformer for DiamondJS template compilation","directories":{},"_nodeVersion":"20.18.1","dependencies":{"@parcel/plugin":"^2.12.0","@diamondjs/compiler":"^2.2.2","@diamondjs/primafacie":"^2.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","parcel":"^2.12.0"},"peerDependencies":{"@parcel/core":"^2.12.0"},"_npmOperationalInternal":{"tmp":"tmp/parcel-transformer-diamond_2.2.2_1787290334701_0.024556863469809898","host":"s3://npm-registry-packages-npm-production"}},"2.2.3":{"_id":"@diamondjs/parcel-transformer-diamond@2.2.3","bugs":{"url":"https://github.com/Node0/diamondjs/issues"},"dist":{"shasum":"d71e272031cab7b9ff9b579ec0a28f1f65bebeb3","tarball":"https://registry.npmjs.org/@diamondjs/parcel-transformer-diamond/-/parcel-transformer-diamond-2.2.3.tgz","fileCount":5,"integrity":"sha512-uuO0y0OdmZj0k6C0VQGqGgAacYZRu4EF5Sxg3F1F1gfmyrC4CUlygmsQ1ugmLDLZplH2OaSVVSvGS4F40keDsA==","signatures":[{"sig":"MEQCIDxuHY7jSDo4hvoQ5y5K0Np96pF+qQ4HGsrksbHY9rw+AiBGoXGeQ7JnRz/05Y89GJfniDQs0cFZxa4pgk46DybJug==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC4ACvDyMw2T6rBVV3/Yqo5qj8340H0jllAc0AfGfZV9AIgNSUZhxNInGAXUJyQRqHrY7DQB0bQvqBvzuVvzsFeZ2E="}],"unpackedSize":12437},"main":"./dist/index.js","name":"@diamondjs/parcel-transformer-diamond","types":"./dist/index.d.ts","engines":{"parcel":"2.x"},"gitHead":"6ace36013530cdf8e978456696fe24f9953bb775","license":"MIT","scripts":{"dev":"tsup src/index.ts --format cjs --dts --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup src/index.ts --format cjs --dts --clean","clean":"rm -rf dist","test:watch":"vitest","test:coverage":"vitest run --coverage"},"version":"2.2.3","_npmUser":{"name":"jhacobian","email":"joehacobian@gmail.com"},"homepage":"https://github.com/Node0/diamondjs#readme","keywords":["parcel","parcel-plugin","parcel-transformer","diamondjs"],"repository":{"url":"git+https://github.com/Node0/diamondjs.git","type":"git","directory":"packages/parcel-plugin"},"_npmVersion":"10.8.2","description":"Parcel 2 transformer for DiamondJS template compilation","directories":{},"maintainers":[{"name":"jhacobian","email":"joehacobian@gmail.com"}],"_nodeVersion":"20.18.1","dependencies":{"@parcel/plugin":"^2.12.0","@diamondjs/compiler":"^2.2.3","@diamondjs/primafacie":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","parcel":"^2.12.0"},"peerDependencies":{"@parcel/core":"^2.12.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/parcel-transformer-diamond_2.2.3_1790737971809_0.41854031176610174"}}},"time":{"created":"2026-08-21T05:32:14.545Z","modified":"2026-09-30T03:12:52.065Z","2.2.2":"2026-08-21T05:32:14.835Z","2.2.3":"2026-09-30T03:12:51.899Z"},"bugs":{"url":"https://github.com/Node0/diamondjs/issues"},"license":"MIT","homepage":"https://github.com/Node0/diamondjs#readme","keywords":["parcel","parcel-plugin","parcel-transformer","diamondjs"],"repository":{"url":"git+https://github.com/Node0/diamondjs.git","type":"git","directory":"packages/parcel-plugin"},"description":"Parcel 2 transformer for DiamondJS template compilation","maintainers":[{"name":"jhacobian","email":"joehacobian@gmail.com"}],"readme":"# 💎 @diamondjs/parcel-transformer-diamond\n\n**Zero-config Parcel 2 integration: your `.html` templates compile to transparent JavaScript during bundling. Configuration is two lines.**\n\n---\n\n## What is this?\n\nThe Parcel 2 transformer that wires [`@diamondjs/compiler`](https://www.npmjs.com/package/@diamondjs/compiler) into your build. It detects Diamond templates (binding commands, `${interpolation}`, structural elements), compiles them with source maps, pairs them with their component classes, and injects the `run_mode` → `__DIAMOND_DEV__` flag that dev-only framework paths (route-table narration, richer diagnostics) are dead-code-eliminated by in prod builds.\n\nNo `vite.config.js`. No `webpack.config.js`. Just `.parcelrc`:\n\n```json\n{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.html\": [\"@diamondjs/parcel-transformer-diamond\", \"...\"]\n  }\n}\n```\n\n```bash\n# Usually installed via the dev meta-package (compiler + transformer + parcel + typescript + tool bins):\nnpm install --save-dev @diamondjs/dev\n\n# Or standalone (bring your own parcel):\nnpm install --save-dev @diamondjs/parcel-transformer-diamond parcel\n```\n\nThen:\n\n```bash\nnpx parcel src/index.html          # dev server\nnpx parcel build src/index.html    # production build\n```\n\n## Dev/prod modes\n\n`app/config/config.json` → `run_mode: \"dev\" | \"prod\"` controls `__DIAMOND_DEV__` injection. In dev, the router narrates its resolved route table at startup through `Print` and dev-only diagnostics stay live; in prod, every such path is eliminated from the bundle.\n\n## Design constraints\n\n- **< 300 LOC** — currently ~55% of budget; the transformer stays a thin honest adapter, with the real work in the compiler\n\n---\n\nPart of [DiamondJS](https://github.com/Node0/diamondjs) — the first JavaScript framework designed for the human-LLM collaborative development era.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}