{"_id":"@ape-egg/prettier-plugin-vibe","name":"@ape-egg/prettier-plugin-vibe","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@ape-egg/prettier-plugin-vibe","version":"0.1.0","type":"module","description":"Prettier plugin for Vibe — indents <!-- if/each/else --> directive blocks and keeps @[...] expressions on one line","main":"index.js","homepage":"https://vibe.korte.kim","exports":{".":"./index.js"},"keywords":["prettier","prettier-plugin","vibe","html","formatter"],"author":{"name":"kkortes"},"license":"ISC","publishConfig":{"access":"public"},"peerDependencies":{"prettier":"^3.0.0"},"gitHead":"e21df035ea4a6522c3dd11b42791043da7093e16","_id":"@ape-egg/prettier-plugin-vibe@0.1.0","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-0rITb1V9NWweFL0KqOrFFn3CCNMhvcmtshU7V3KAiwG8qVVD3YntZQirCg5aHemwcl/OXV9QDmxp2QKr5qZAgA==","shasum":"4f312a0152b150b38a0296893fb862915a3da497","tarball":"https://registry.npmjs.org/@ape-egg/prettier-plugin-vibe/-/prettier-plugin-vibe-0.1.0.tgz","fileCount":4,"unpackedSize":11763,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCWrRyaemMc2LCBKA2JpvZb+W8DK+JnvfU55D7SR/FvDgIgC4mZgDOVNxZN+KZa/ef3MJaKBJuADAhhjTru8RxlH9Y="}]},"_npmUser":{"name":"kortes","email":"me@korte.kim"},"directories":{},"maintainers":[{"name":"kortes","email":"me@korte.kim"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/prettier-plugin-vibe_0.1.0_1779967381146_0.01229968821226679"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-28T11:23:01.004Z","0.1.0":"2026-05-28T11:23:01.279Z","modified":"2026-05-28T11:23:01.514Z"},"maintainers":[{"name":"kortes","email":"me@korte.kim"}],"description":"Prettier plugin for Vibe — indents <!-- if/each/else --> directive blocks and keeps @[...] expressions on one line","homepage":"https://vibe.korte.kim","keywords":["prettier","prettier-plugin","vibe","html","formatter"],"author":{"name":"kkortes"},"license":"ISC","readme":"# @ape-egg/prettier-plugin-vibe\n\n> ⚠️ **Early alpha — subject to change.** A development-only formatting plugin for [Vibe](https://github.com/kkortes/vibe). It evolves alongside Vibe and will reach a stable release once the framework settles.\n\nPrettier plugin for [Vibe](https://github.com/kkortes/vibe) templates. Prettier sees Vibe's control-flow directives (`<!-- if -->`, `<!-- each -->`, `<!-- else -->`, `<!-- /if -->`) as plain HTML comments, so it leaves their contents flat. This plugin teaches Prettier to treat a directive pair as a block and **indent its body**, while leaving everything else to Prettier's own HTML formatter.\n\n```html\n<!-- before -->\n<!-- if items.length -->\n<item-row>@[item.name]</item-row>\n<!-- /if -->\n\n<!-- after -->\n<!-- if items.length -->\n  <item-row>@[item.name]</item-row>\n<!-- /if -->\n```\n\n## Install\n\n```bash\nbun add -d @ape-egg/prettier-plugin-vibe\n# or\nnpm install -D @ape-egg/prettier-plugin-vibe\n```\n\n## Usage\n\nAdd it to your Prettier config:\n\n```json\n{\n  \"plugins\": [\"@ape-egg/prettier-plugin-vibe\"]\n}\n```\n\nThat's it. `prettier --write` (and editor format-on-save) now indent directive blocks in `.html` files. All other formatting — attributes, elements, wrapping — is unchanged; the plugin wraps Prettier's built-in HTML parser and printer rather than replacing it.\n\n## What it does\n\n- **Indents block directives.** `if` / `else if` / `else` / `each` written on their own line get their body indented one level; the directive comments themselves stay at the block level.\n- **Leaves inline directives alone.** A directive embedded in a text flow (e.g. `inflicts<!-- if x --> more<!-- /if -->.`) is kept inline, so no rendering-significant whitespace is introduced.\n- **Never breaks `@[…]` expressions across an attribute or splits them as tags** — expression boundaries (including nested brackets and quoted strings) are recognised exactly as Vibe's runtime recognises them, so they can't derail tag detection.\n- **Idempotent.** Formatting an already-formatted file is a no-op.\n\n## Notes\n\n- Works under Prettier's default `htmlWhitespaceSensitivity: \"css\"` — it does **not** require (or want) `\"ignore\"`, which would move/remove whitespace that affects rendering.\n- A directive is treated as a block when it borders whitespace or a tag on both sides, and as inline when it directly abuts text. This rule is stable across repeated formatting.\n","readmeFilename":"README.md","_rev":"1-9eca42c6f4ba7912d9ee93422e1a92f1"}