{"versions":{"1.0.1":{"name":"@halo-dev/vite-plugin-halo-theme","version":"1.0.1","description":"A Vite plugin for Halo theme that provides HTML template pre-compilation and multi-page entry support.","keywords":["halo","halo-theme","vite","vite-plugin"],"bugs":{"url":"https://github.com/halo-sigs/vite-plugin-halo-theme/issues"},"license":"MIT","author":{"name":"Halo","url":"https://github.com/halo-dev"},"repository":{"type":"git","url":"git+https://github.com/halo-sigs/vite-plugin-halo-theme.git"},"type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"dependencies":{"@halo-dev/api-client":"^2.22.0","js-yaml":"^4.1.1"},"devDependencies":{"@types/js-yaml":"^4.0.9","@types/node":"^24.12.0","@typescript/native-preview":"7.0.0-dev.20260311.1","husky":"^9.1.7","lint-staged":"^16.3.3","oxfmt":"^0.38.0","oxlint":"^1.54.0","tsdown":"^0.21.2","typescript":"^5.9.3","vite":"^7.3.1","vitest":"^4.0.18"},"peerDependencies":{"vite":"^7.0.0 || ^8.0.0"},"lint-staged":{"**/*":"oxfmt --no-error-on-unmatched-pattern","*.{ts}":["oxlint"]},"compatiblePackages":{"schemaVersion":1,"rolldown":{"type":"incompatible","reason":"Uses Vite-specific APIs"},"rollup":{"type":"incompatible","reason":"Uses Vite-specific APIs"}},"scripts":{"build":"tsdown","test":"vitest run","test:watch":"vitest","fmt":"oxfmt","lint":"oxlint"},"_id":"@halo-dev/vite-plugin-halo-theme@1.0.1","homepage":"https://github.com/halo-sigs/vite-plugin-halo-theme#readme","_integrity":"sha512-gUoRolJ7LaF58Hz9BwiIk21PGRuT2xvoWI6XsauH3GcwMT5nHZAhFuufRrTdGnOlNCKRv6j6g6b5fji21AZ5eQ==","_resolved":"/tmp/2addfb4f9e6f1c14ac6a8275efdebeb5/halo-dev-vite-plugin-halo-theme-1.0.1.tgz","_from":"file:halo-dev-vite-plugin-halo-theme-1.0.1.tgz","_nodeVersion":"24.14.0","_npmVersion":"11.11.1","dist":{"integrity":"sha512-gUoRolJ7LaF58Hz9BwiIk21PGRuT2xvoWI6XsauH3GcwMT5nHZAhFuufRrTdGnOlNCKRv6j6g6b5fji21AZ5eQ==","shasum":"3ee8fbc50c2ac31ef579d3a0a4ee29db3ac14dfa","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@halo-dev/vite-plugin-halo-theme/-/vite-plugin-halo-theme-1.0.1.tgz","fileCount":6,"unpackedSize":27691,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@halo-dev%2fvite-plugin-halo-theme@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEBzEqkGJyMUvSeKpBCUK+NEEk1sZz/CARZOh/Nu5/I7AiEAx2Q+VK3HQ4ipVwN7lBEQp7u6DqZXiXSD+jgvdj1YHw8="}],"size":9069},"_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a25fd77e-c754-45e3-9fca-315241fcf142"}},"directories":{},"maintainers":[{"name":"anonymous","email":"i@ryanc.cc"},{"name":"anonymous","email":"1484563614@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vite-plugin-halo-theme_1.0.1_1773371923969_0.6514708416295971"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-13T03:18:44.107Z","publish_time":1773371924107,"_source_registry_name":"default","contributors":[]},"1.0.0":{"name":"@halo-dev/vite-plugin-halo-theme","version":"1.0.0","keywords":["halo","halo-theme","vite"],"author":{"url":"https://github.com/halo-dev","name":"Halo"},"license":"MIT","_id":"@halo-dev/vite-plugin-halo-theme@1.0.0","maintainers":[{"name":"anonymous","email":"i@ryanc.cc"},{"name":"anonymous","email":"1484563614@qq.com"}],"homepage":"https://github.com/halo-sigs/vite-plugin-halo-theme#readme","bugs":{"url":"https://github.com/halo-sigs/vite-plugin-halo-theme/issues"},"dist":{"shasum":"b0436adf569c2e7f9773de0cdea7ecbe0b9a9463","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@halo-dev/vite-plugin-halo-theme/-/vite-plugin-halo-theme-1.0.0.tgz","fileCount":5,"integrity":"sha512-vrd+F6UV1/fjB/cg73/eI+CKCXUeIwVegK42W/SdIuVwg33OfX139QS6dk8+N1WLW9e8kJoQokjMdYdsj+R9LQ==","signatures":[{"sig":"MEUCIGpDjazMJ+QRa/34lujf0+Pzxips+7qkBxICF3CchT7mAiEA+4WlvVNr/TUDiFuhLUvTiEm+LgeBleNIXZfofk99Kg4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26360,"size":8158},"type":"module","_from":"file:halo-dev-vite-plugin-halo-theme-1.0.0.tgz","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"fmt":"oxfmt","lint":"oxlint","test":"vitest run","build":"tsdown","test:watch":"vitest"},"_npmUser":{"name":"anonymous","email":"i@ryanc.cc"},"_resolved":"/private/var/folders/pl/2sj_41xn3nv98xvrfr7xyrl00000gn/T/0067f7ad1e2b7d7c03bd9ecec72090ed/halo-dev-vite-plugin-halo-theme-1.0.0.tgz","_integrity":"sha512-vrd+F6UV1/fjB/cg73/eI+CKCXUeIwVegK42W/SdIuVwg33OfX139QS6dk8+N1WLW9e8kJoQokjMdYdsj+R9LQ==","repository":{"url":"git+https://github.com/halo-sigs/vite-plugin-halo-theme.git","type":"git"},"_npmVersion":"11.9.0","description":"A Vite plugin for Halo theme that provides HTML template pre-compilation and multi-page entry support.","directories":{},"lint-staged":{"**/*":"oxfmt --no-error-on-unmatched-pattern","*.{ts}":["oxlint"]},"_nodeVersion":"24.14.0","dependencies":{"js-yaml":"^4.1.1","@halo-dev/api-client":"^2.22.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","husky":"^9.1.7","oxfmt":"^0.38.0","oxlint":"^1.54.0","tsdown":"^0.21.2","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^24.12.0","lint-staged":"^16.3.3","@types/js-yaml":"^4.0.9","@typescript/native-preview":"7.0.0-dev.20260311.1"},"peerDependencies":{"vite":"^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-halo-theme_1.0.0_1773302414500_0.23695316638664088","host":"s3://npm-registry-packages-npm-production"},"_cnpmcore_publish_time":"2026-03-12T08:00:14.660Z","publish_time":1773302414660,"_source_registry_name":"default","contributors":[]},"1.0.3":{"name":"@halo-dev/vite-plugin-halo-theme","version":"1.0.3","description":"A Vite plugin for Halo theme that provides HTML template pre-compilation and multi-page entry support.","keywords":["halo","halo-theme","vite","vite-plugin"],"bugs":{"url":"https://github.com/halo-sigs/vite-plugin-halo-theme/issues"},"license":"MIT","author":{"name":"Halo","url":"https://github.com/halo-dev"},"repository":{"type":"git","url":"git+https://github.com/halo-sigs/vite-plugin-halo-theme.git"},"type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"build":"vp pack","prepack":"vp pack","test":"vp test run","test:watch":"vp test","fmt":"vp fmt","lint":"vp lint","prepare":"vp config","prepublishOnly":"vp pack","release":"release-it"},"dependencies":{"@halo-dev/api-client":"^2.23.0","yaml":"^2.8.3"},"devDependencies":{"@types/node":"^24.12.0","@typescript/native-preview":"7.0.0-dev.20260311.1","release-it":"^19.2.4","typescript":"^5.9.3","vite":"catalog:","vite-plus":"catalog:","vitest":"catalog:"},"peerDependencies":{"vite":"^7.0.0 || ^8.0.0"},"packageManager":"pnpm@10.33.0","compatiblePackages":{"schemaVersion":1,"rolldown":{"type":"incompatible","reason":"Uses Vite-specific APIs"},"rollup":{"type":"incompatible","reason":"Uses Vite-specific APIs"}},"gitHead":"9afd98119c2058a3e27b9162093b34cb5e9d24b7","_id":"@halo-dev/vite-plugin-halo-theme@1.0.3","homepage":"https://github.com/halo-sigs/vite-plugin-halo-theme#readme","_nodeVersion":"24.14.1","_npmVersion":"11.12.0","dist":{"integrity":"sha512-Xfp6i0lfUdSQ9nUI7eOdJqcRS8wLZMGmLFcD2wAV3dMevSGPsAFphtgjALKa8Lih4ImQ5ZS3T2cojFEcCzPIjw==","shasum":"3283e33017110227ee67e508d2f5b577d76dfffa","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@halo-dev/vite-plugin-halo-theme/-/vite-plugin-halo-theme-1.0.3.tgz","fileCount":6,"unpackedSize":27644,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@halo-dev%2fvite-plugin-halo-theme@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDPY5voXzbKapKpskkELhzIljeJXeKZKk3OqCmwknfPHgIhAKqlPnBAoEKJG33pw7oH1ZSXVl+91Hm5MF24wTrTgXtB"}],"size":9000},"_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a25fd77e-c754-45e3-9fca-315241fcf142"}},"directories":{},"maintainers":[{"name":"anonymous","email":"i@ryanc.cc"},{"name":"anonymous","email":"1484563614@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vite-plugin-halo-theme_1.0.3_1774423949813_0.9274555967218865"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-25T07:32:29.987Z","publish_time":1774423949987,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"1.0.3"},"name":"@halo-dev/vite-plugin-halo-theme","time":{"created":"2026-03-13T03:18:58.968Z","modified":"2026-03-25T07:32:41.498Z","1.0.1":"2026-03-13T03:18:44.107Z","1.0.0":"2026-03-12T08:00:14.660Z","1.0.3":"2026-03-25T07:32:29.987Z"},"readme":"# @halo-dev/vite-plugin-halo-theme\n\n[简体中文](./README.zh.md)\n\nA Vite plugin built specifically for Halo theme development.\n\nIt precompiles templates before Vite processes HTML, adds lightweight template reuse features (`include`, `slot`, `props`) for Halo themes, and automatically treats HTML files in `src` as multi-page entries output to `templates`.\n\n## Why This Plugin\n\nHalo themes often need reusable page fragments and layout composition.\nThis plugin fills that gap during precompilation, reducing template duplication and improving maintainability.\n\nMain capabilities:\n\n1. Template reuse features: supports `include`, `slot`, `props`, and related semantics.\n2. Automatically scans the `src` directory, uses all HTML files as Vite build entries, and handles static asset imports.\n\n## Install\n\n```bash\npnpm add -D @halo-dev/vite-plugin-halo-theme\n```\n\n## Quick Start\n\nEnable the plugin in `vite.config.ts`:\n\n```ts\nimport { defineConfig } from \"vite\";\nimport { haloThemePlugin } from \"@halo-dev/vite-plugin-halo-theme\";\n\nexport default defineConfig({\n  plugins: [haloThemePlugin()],\n});\n```\n\n## Example\n\nSee the runnable example project in [`example`](./example).\n\n```bash\ncd example\npnpm install\npnpm build\n```\n\n## Directory Conventions\n\nThis plugin is Halo-specific and uses the following defaults:\n\n- Page source directory: `src`\n- Partials directory: `src/partials`\n- Static assets directory: `public`\n- Output directory: `templates`\n- Output assets directory: `templates/assets`\n\nExample structure:\n\n```text\n.\n├── public\n│   └── ...\n├── src\n│   ├── js\n│   │   ├── index.js\n│   │   └── post.js\n│   ├── css\n│   │   └── index.css\n│   ├── index.html           # page entry\n│   ├── post.html            # page entry\n│   └── partials             # template partials directory (convention)\n│       ├── layout.html      # partial template\n│       └── card.html        # partial template\n├── theme.yaml\n└── templates                # output directory for templates and assets\n```\n\n## Entry Scanning Rules\n\nThe plugin scans all `.html` files under `src` and skips `src/partials`.\n\nMapping examples:\n\n- `src/index.html` -> `templates/index.html`\n- `src/post.html` -> `templates/post.html`\n\n## Template Syntax\n\n> Note: The syntax in this section (`include`, `slot`, `props`) is precompiled only during the Vite build phase. It is not native Thymeleaf syntax.  \n> Keep the two phases separate: Vite compile time (frontend build) vs Thymeleaf render time (backend runtime).\n\n### Include\n\n```html\n<include src=\"layout.html\">\n  <main>...</main>\n</include>\n```\n\n### Props\n\nUsage:\n\n```html\n<include src=\"card.html\" title=\"Hello\"></include>\n```\n\nIn partial:\n\n```html\n<h2>{{title}}</h2>\n```\n\n### Default Slot\n\nIn partial:\n\n```html\n<slot />\n```\n\n### Named Slot\n\nIn partial:\n\n```html\n<slot name=\"head\" />\n```\n\nUsage:\n\n```html\n<include src=\"layout.html\">\n  <template name=\"head\">\n    <title>Page Title</title>\n  </template>\n  <main>...</main>\n</include>\n```\n\n## Include Path Resolution\n\n- `./foo.html` / `../foo.html`: relative to current file\n- `/foo.html`: relative to `src`\n- `foo.html`: resolves `src/partials/foo.html` first\n- `partials/foo.html`: resolves as `src/partials/foo.html`\n\n## Development Commands\n\n```bash\npnpm install\npnpm test\npnpm build\npnpm lint\npnpm fmt\n```\n\n## Compatibility and Boundaries\n\n- The current parser is intentionally lightweight and focused on plugin syntax needs, not full HTML5 specification parsing.\n- `{{prop}}` is string-level interpolation and does not evaluate expressions.\n- This plugin is purpose-built for Halo themes, not a general template engine for all site stacks.","users":{}}