{"_id":"@belsignum/vitex","_rev":"7-c0c579e531b84b1f78bdf3d5046b90f8","name":"@belsignum/vitex","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.1":{"name":"@belsignum/vitex","version":"1.0.1","keywords":["vite","typo3","manifest","build"],"author":{"name":"Andreas Sommer"},"license":"MIT","_id":"@belsignum/vitex@1.0.1","maintainers":[{"name":"andreas-sommer","email":"sommer@belsignum.com"}],"homepage":"https://github.com/Andreas-Sommer/vitex#readme","bugs":{"url":"https://github.com/Andreas-Sommer/vitex/issues"},"dist":{"shasum":"d028d7f5ca1a5340d1ccd28e20e7ce5e8bfdb5d8","tarball":"https://registry.npmjs.org/@belsignum/vitex/-/vitex-1.0.1.tgz","fileCount":9,"integrity":"sha512-hbsC9eZ7GLCHTjpPDXttoKjMl+l6HCoqQNMnVUXXz7I2mOTbs3GGJjAKoWiTvUQT9ylCp490UBL3pdp6BCGh4Q==","signatures":[{"sig":"MEQCIEl7xuFE2KV/Y/uvrqa696bljWnVJb/xSty8Te/xcn3FAiBphMMSNX2DYJYzStzH+iw7f7rqTMdbStN8dJcoxEpC+g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14343},"main":"./src/Vitex.js","type":"module","exports":{".":"./src/Vitex.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"andreas-sommer","email":"sommer@belsignum.com"},"repository":{"url":"git+https://github.com/Andreas-Sommer/vitex.git","type":"git"},"_npmVersion":"10.9.2","description":"A configurable Vite configuration builder class optimized for modular frontend setups such as TYPO3 extensions.","directories":{},"_nodeVersion":"23.6.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/vitex_1.0.1_1742680754852_0.6108693566726515","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@belsignum/vitex","version":"1.0.2","keywords":["vite","typo3","manifest","build"],"author":{"name":"Andreas Sommer"},"license":"MIT","_id":"@belsignum/vitex@1.0.2","maintainers":[{"name":"andreas-sommer","email":"sommer@belsignum.com"}],"homepage":"https://github.com/Andreas-Sommer/vitex#readme","bugs":{"url":"https://github.com/Andreas-Sommer/vitex/issues"},"dist":{"shasum":"17d753da98a9824c3f1d8f33ac92781f41fd959f","tarball":"https://registry.npmjs.org/@belsignum/vitex/-/vitex-1.0.2.tgz","fileCount":9,"integrity":"sha512-QfRkxCZaVvl/CpIEIkITl3WUeK8PU9lUrlC6gNSD4Eh1+R0Frb7+b4wAbXmtuJms5mIgSH6gs8R+sgmOu8S3hw==","signatures":[{"sig":"MEUCIBaOV0gbFqeMkNSjw4l3Ccyyac0wjRcURbok5VnsjqpdAiEAkRTSxo/bTCqagzsKC+zLIZhR1wNDwE7zT3MwoUobgcs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14375},"main":"./src/Vitex.js","type":"module","exports":{".":"./src/Vitex.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"andreas-sommer","email":"sommer@belsignum.com"},"repository":{"url":"git+https://github.com/Andreas-Sommer/vitex.git","type":"git"},"_npmVersion":"10.9.2","description":"A configurable Vite configuration builder class optimized for modular frontend setups such as TYPO3 extensions.","directories":{},"_nodeVersion":"23.6.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/vitex_1.0.2_1742680925725_0.49325887628929665","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@belsignum/vitex","version":"1.0.3","keywords":["vite","typo3","manifest","build"],"author":{"name":"Andreas Sommer"},"license":"MIT","_id":"@belsignum/vitex@1.0.3","maintainers":[{"name":"andreas-sommer","email":"sommer@belsignum.com"}],"homepage":"https://github.com/Andreas-Sommer/vitex#readme","bugs":{"url":"https://github.com/Andreas-Sommer/vitex/issues"},"dist":{"shasum":"e5bc953cce7c2398101d3394736a35de11b594b8","tarball":"https://registry.npmjs.org/@belsignum/vitex/-/vitex-1.0.3.tgz","fileCount":5,"integrity":"sha512-mzebbf2bbJho7vUoA1hP7k/Vn0IeHZaAtNgjrZHUX4ln8JxTGiuREFBJxPXKQUcfdLliwysKVl64eBpNVqC93Q==","signatures":[{"sig":"MEUCIFNZZtP81oeiLu6ueBsNYpW1zBIF/ddB+J+bHRQ7rEaBAiEA9auVbByLb+sTBZ3Woz73EcJSNp7Q3XtdqeFkJVbkFn8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13641},"main":"./src/Vitex.js","type":"module","exports":{".":"./src/Vitex.js"},"gitHead":"d9e2e7c383bc9f9303b3539b5fccd310d916cd67","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"andreas-sommer","email":"sommer@belsignum.com"},"repository":{"url":"git+https://github.com/Andreas-Sommer/vitex.git","type":"git"},"_npmVersion":"10.9.2","description":"A configurable Vite configuration builder class optimized for modular frontend setups such as TYPO3 extensions.","directories":{},"_nodeVersion":"23.6.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/vitex_1.0.3_1742904198783_0.24470530832943416","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@belsignum/vitex","version":"1.1.0","description":"A configurable Vite configuration builder class optimized for modular frontend setups such as TYPO3 extensions.","type":"module","main":"./src/Vitex.js","exports":{".":"./src/Vitex.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Andreas-Sommer/vitex.git"},"keywords":["vite","typo3","manifest","build"],"author":{"name":"Andreas Sommer"},"license":"MIT","bugs":{"url":"https://github.com/Andreas-Sommer/vitex/issues"},"homepage":"https://github.com/Andreas-Sommer/vitex#readme","_id":"@belsignum/vitex@1.1.0","gitHead":"091adff884e1a898b9e60e4fc36f92910d97ecff","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-r5mJ96hHI8axj5A8KswZWgo064pv2I27n0yr2i3yj2BngQnHqFbWuUNjf0pPvFMiCw6RIqefy65/74/bmEoNig==","shasum":"95bc34ed6785dca888170e5a32d6822cc36a73ff","tarball":"https://registry.npmjs.org/@belsignum/vitex/-/vitex-1.1.0.tgz","fileCount":6,"unpackedSize":22861,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC8H0uojJiav+/gv1nMtxPiZKsvefeWx/eDlwloDWRTgAIhALT12a7H7fT8OzX/UCW6QDWyNxNpxkqkZQZqW/qrpXAf"}]},"_npmUser":{"name":"andreas-sommer","email":"sommer@belsignum.com"},"directories":{},"maintainers":[{"name":"andreas-sommer","email":"sommer@belsignum.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vitex_1.1.0_1756293600328_0.1250893847672092"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-22T21:59:14.768Z","modified":"2025-08-27T11:20:00.706Z","1.0.0":"2025-03-22T21:52:19.260Z","1.0.1":"2025-03-22T21:59:15.022Z","1.0.2":"2025-03-22T22:02:05.913Z","1.0.3":"2025-03-25T12:03:19.081Z","1.1.0":"2025-08-27T11:20:00.511Z"},"bugs":{"url":"https://github.com/Andreas-Sommer/vitex/issues"},"author":{"name":"Andreas Sommer"},"license":"MIT","homepage":"https://github.com/Andreas-Sommer/vitex#readme","keywords":["vite","typo3","manifest","build"],"repository":{"type":"git","url":"git+https://github.com/Andreas-Sommer/vitex.git"},"description":"A configurable Vite configuration builder class optimized for modular frontend setups such as TYPO3 extensions.","maintainers":[{"name":"andreas-sommer","email":"sommer@belsignum.com"}],"readme":"# 🛠️ Vitex\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@belsignum/vitex\">\n    <img alt=\"npm\" src=\"https://img.shields.io/npm/v/@belsignum/vitex?style=flat-square\">\n  </a>\n  <a href=\"https://opensource.org/licenses/MIT\">\n    <img alt=\"License: MIT\" src=\"https://img.shields.io/badge/license-MIT-green.svg?style=flat-square\">\n  </a>\n  <img alt=\"Made with Love\" src=\"https://img.shields.io/badge/Made%20with-%E2%9D%A4-red?style=flat-square\">\n  <img alt=\"Status: Developer Friendly\" src=\"https://img.shields.io/badge/status-developer--friendly-blue?style=flat-square\">\n</p>\n\nA modular and reusable Vite configuration helper tailored for TYPO3 frontend development.\n\nVitex is designed to simplify the build setup for TYPO3-based projects using Vite. It provides automatic entrypoint resolution, namespaced output for sites handling, and post-build manifest cleanup. It supports multi-site structures, structured SCSS/JS asset handling, and a clean developer experience.\n\n## 🚀 Features\n\n- Automatic entrypoint resolution via `ViteEntrypoints.json`\n- Namespace-aware output naming for sites (e.g. `mysite_default`, `global_main`)\n- Manifest cleanup (removes self-imports, normalizes asset names)\n- Configurable aliases, copy targets, plugins, server settings\n- No build step required – raw JS usable directly in dev setup\n- Fully compatible with Vite + TYPO3 + SCSS/JS workflows\n\n**New in v1.1.0**\n- Optional **Root Build support**: discover entry points in a project-level `Build/Frontend` folder\n    - Default patterns (configurable):\n        - `Styles/*.scss`, `JavaScript/*.js` (top-level only)\n        - `Styles/*/*.scss`, `JavaScript/*/*.js` (one sitename folder level)\n- Sitename-aware output for Root Build (`<sitename>_File.css`; fallback `global_*`)\n- PostCSS auto-pickup and CSS minification via `esbuild` (keeps icon-font PUA glyphs intact)\n- Improved alias resolution and `staticCopyTargets` handling\n- Post-build manifest normalization retained\n\n## 📦 Installation\n\nIf used locally:\n\n```bash\nnpm install file:./packages/vitex\n```\nOr as an installed package:\n\n```bash\nnpm install @belsignum/vitex\n```\n\n## 🧩 Usage\n```JavaScript\n// vite.config.js\nimport Vitex from 'vitex';\n\nconst vite = new Vitex({\n    sitenames: ['mysite', 'other-site'],\n    outputPath: 'public/assets/',\n    packagesPath: 'packages/sitepackage',\n    aliases: [\n        { find: '@sitepackage', replacement: 'packages/sitepackage' }\n    ],\n    staticCopyTargets: [\n        { src: 'node_modules/bootstrap-icons/*', dest: 'bootstrap-icons' }\n    ],\n    server: {\n        allowedHosts: ['vite.ddev.site']\n    },\n\n    // New in v1.1.0:\n    rootBuild: {\n        enabled: true,               // enable discovery in Build/Frontend\n        path: 'Build/Frontend',\n        patterns: [\n            'Styles/*.scss',\n            'JavaScript/*.js',\n            'Styles/*/*.scss',\n            'JavaScript/*/*.js'\n        ],\n        // treat underscore-prefixed files as partials/components\n        ignoreUnderscore: true\n    }\n});\n\nexport default vite.getViteConfig();\n```\n\n## Scripts\n\nAdd npm scripts to your `package.json`:\n\n```json\n\"scripts\": {\n\"dev\": \"vite --host 0.0.0.0\",\n\"build\": \"vite build\",\n\"watch\": \"vite build --watch\",\n\"preview\": \"vite preview\"\n}\n```\n\n## ⚙️ Configuration Options\n\nVitex accepts the following options when creating a new instance:\n\n| Option              | Type       | Default              | Description |\n|---------------------|------------|----------------------|-------------|\n| **sitenames**       | `string[]` | `[]`                 | List of TYPO3 site identifiers used for namespacing output files. |\n| **outputPath**      | `string`   | `public/assets/`     | Path where compiled assets will be written. |\n| **packagesPath**    | `string`   | `packages/sitepackage` | Path to your sitepackage or TYPO3 package containing frontend sources. |\n| **aliases**         | `array`    | `[]`                 | Custom alias definitions passed directly to Vite (`{ find, replacement }`). |\n| **staticCopyTargets** | `array`  | `[]`                 | Copy patterns for static assets (uses [vite-plugin-static-copy](https://github.com/sapphi-red/vite-plugin-static-copy)). |\n| **server**          | `object`   | `{}`                 | Extra Vite dev server configuration, e.g. `allowedHosts`. |\n| **rootBuild**       | `object`   | `{ enabled: false }` | Enables discovery of entrypoints from a global `Build/Frontend` folder. |\n| └─ `enabled`        | `boolean`  | `false`              | Whether root-level build discovery is active. |\n| └─ `path`           | `string`   | `\"Build/Frontend\"`   | Folder scanned for global entrypoints. |\n| └─ `patterns`       | `string[]` | see below            | Glob patterns used to discover SCSS/JS entrypoints.<br>Default: `['Styles/*.scss','JavaScript/*.js','Styles/*/*.scss','JavaScript/*/*.js']`. |\n| └─ `ignoreUnderscore` | `boolean` | `true`              | Treat underscore-prefixed files (`_partial.scss`) as partials and ignore them. |\n\n## Changelog\n\n### v1.1.0\n- Added support for **Root Build** (e.g. project-level `Build/Frontend`)\n- Improved configuration and documentation\n- PostCSS auto-pickup and CSS minification via `esbuild` (keeps icon-font PUA glyphs intact)\n\n### v1.0.3\n- Initial public release\n\n---\n\n## License\n\n[MIT License](https://opensource.org/licenses/MIT)\n","readmeFilename":"README.md"}