{"_id":"@art70x/prewind","_rev":"2-33fc5cbe9e3748c43ea63c964d14d041","name":"@art70x/prewind","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@art70x/prewind","version":"1.0.0","keywords":["cli","utility","preprocessor","shorthand","tailwindcss","art70x"],"author":{"name":"art70x"},"license":"MIT","_id":"@art70x/prewind@1.0.0","maintainers":[{"name":"art70x","email":"art70x@outlook.com"}],"homepage":"https://github.com/art70x/Prewind#readme","bugs":{"url":"https://github.com/art70x/Prewind/issues"},"bin":{"prewind":"dist/cli.js"},"dist":{"shasum":"951a7064c9825d8490d330e720acb83194cc92e5","tarball":"https://registry.npmjs.org/@art70x/prewind/-/prewind-1.0.0.tgz","fileCount":4,"integrity":"sha512-dY9/X+OothjLAs7QDnc45+RSvT+iAsEk5ez9sDyezihUdhgsu+KQuScs3zf6O1GmR6DzTn2Cj1zj54+QP76WFQ==","signatures":[{"sig":"MEUCICG8djJak1xnZ+dUgUtFTD0ypaF6hw/r71dSpD8AsYedAiEAp++X2gSDAkjFHxxJnL2MReUR5/qyD9zAUioSFXZCNrU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10082},"type":"module","scripts":{"dev":"tsx src/cli.ts","lint":"eslint .","build":"tsup","check":"tsc","format":"prettier -w src","release":"standard-version","prepublishOnly":"nr build"},"_npmUser":{"name":"art70x","email":"art70x@outlook.com"},"repository":{"url":"git+https://github.com/art70x/Prewind.git","type":"git"},"_npmVersion":"11.6.2","description":"A lightweight preprocessor that expands Tailwind shorthand like hover(px-4 py-2) into hover:px-4 hover:py-2.","directories":{},"_nodeVersion":"24.10.0","dependencies":{"commander":"^14.0.2","fast-glob":"^3.3.3","yoctocolors":"^2.1.2","cli-spinners":"^3.3.0","yocto-spinner":"^1.0.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.20.0","devDependencies":{"tsx":"^4.20.6","jiti":"^2.6.1","tsup":"^8.5.0","eslint":"^9.39.0","terser":"^5.44.0","globals":"^16.5.0","prettier":"^3.6.2","@antfu/ni":"^27.0.1","@eslint/js":"^9.39.0","typescript":"^5.9.3","@types/node":"^24.9.2","standard-version":"^9.5.0","typescript-eslint":"^8.46.2","prettier-plugin-packagejson":"^2.5.19"},"_npmOperationalInternal":{"tmp":"tmp/prewind_1.0.0_1762170740321_0.7696475204642974","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2025-11-03T11:52:20.175Z","modified":"2026-02-15T05:58:44.044Z","1.0.0":"2025-11-03T11:52:20.501Z"},"bugs":{"url":"https://github.com/art70x/Prewind/issues"},"author":{"name":"art70x"},"license":"MIT","homepage":"https://github.com/art70x/Prewind#readme","keywords":["cli","utility","preprocessor","shorthand","tailwindcss","art70x"],"repository":{"url":"git+https://github.com/art70x/Prewind.git","type":"git"},"description":"A lightweight preprocessor that expands Tailwind shorthand like hover(px-4 py-2) into hover:px-4 hover:py-2.","maintainers":[{"name":"art70x","email":"art70x@outlook.com"}],"readme":"# 🌀 Prewind\n\n> write less, expand more\n\n[![NPM Downloads](https://img.shields.io/npm/dm/prewind?style=flat&colorA=030812&colorB=2461db)](https://www.npmjs.com/package/prewind)\n[![NPM Version](https://img.shields.io/npm/v/rewind?style=flat&colorA=030812&colorB=2461db)](https://www.npmjs.com/package/prewind)\n[![Github Stars](https://img.shields.io/github/stars/art70x/prewind?style=flat&colorA=030812&colorB=2461db)](https://github.com/art70x/prewind/stargazers)\n[![License](https://img.shields.io/github/license/art70x/prewind?style=flat&colorA=030812&colorB=2461db)](https://github.com/art70x/prewind/blob/main/LICENSE)\n\nA lightweight **preprocessor** that expands Tailwind-style shorthand into full variant syntax.\nWrite expressive, readable classes like:\n\n```html\n<div\n  class=\"hover(bg-blue-500 text-blue-50) dark(border-blue-300 hover(bg-blue-400 text-blue-950))\"\n></div>\n```\n\nand automatically transform them into:\n\n```html\n<div\n  class=\"hover:bg-blue-500 hover:text-blue-50 dark:border-blue-300 dark:hover:bg-blue-400 dark:hover:text-blue-950\"\n></div>\n```\n\n---\n\n## ✨ Features\n\n- Expand Tailwind shorthand groups automatically\n- Supports **nested variants** (`hover()`, `dark()`, `group-hover()`, `peer-focus()`, etc.)\n- Fast, zero-runtime — designed for build-time processing\n- CLI-friendly — runs before Prettier or your dev server\n- Optional `--debug` flag to print a visual transformation tree\n\n---\n\n## 📦 Installation\n\n```bash\npnpm add -D @art70x/prewind\n# or\nnpm install -D @art70x/prewind\n# or\nyarn add -D @art70x/prewind\n```\n\nGlobal install (optional):\n\n```bash\npnpm add -g @art70x/prewind\n```\n\n---\n\n## ⚙️ CLI Options\n\n| Flag              | Description                                |\n| ----------------- | ------------------------------------------ |\n| `<patterns...>`   | File path(s) or glob pattern(s) to process |\n| `-w, --write`     | Overwrite files in place                   |\n| `-o, --out <dir>` | Output transformed files into a directory  |\n| `--debug`         | Print detailed transformation tree         |\n| `-h, --help`      | Show CLI help                              |\n\n---\n\n## 🚀 Usage\n\n### Print to console\n\n```bash\nprewind src/test.html\n```\n\nOutputs the transformed file to console (does not modify files).\n\n### Write in place\n\n```bash\nprewind -w src/test.html\n```\n\nTransforms and overwrites the file in place.\n\n### Output to directory\n\n```bash\nprewind src/**/*.html -o dist\n```\n\nTransforms matching files and writes them into `dist/`.\n\n### Debug the transformation tree\n\n```bash\nprewind src/test.html --debug\n```\n\nDisplays the nested variant structure before output.\n\n---\n\n## 🧱 Example\n\n**Input:**\n\n```html\n<div\n  class=\"hover(bg-blue-500 text-blue-50) dark(border-blue-300 hover(bg-blue-400 text-blue-950))\"\n></div>\n```\n\n**Command:**\n\n```bash\nprewind -w test.html\n```\n\n**Output:**\n\n```html\n<div\n  class=\"hover:bg-blue-500 hover:text-blue-50 dark:border-blue-300 dark:hover:bg-blue-400 dark:hover:text-blue-950\"\n></div>\n```\n\n---\n\n## 🧩 Integration Example\n\nUse Prewind as a pre-step in your workflow:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"preformat\": \"prewind src/**/*.html -w\",\n    \"format\": \"prettier -w src\"\n  }\n}\n```\n\n---\n\n## 🧠 Why Prewind?\n\nManually writing Tailwind variants is verbose:\n\n```html\n<div\n  class=\"hover:bg-blue-500 hover:text-blue-50 dark:hover:bg-blue-400 dark:hover:text-blue-950\"\n></div>\n```\n\nPrewind lets you express them structurally and clearly:\n\n```html\n<div class=\"hover(bg-blue-500 text-blue-50) dark(hover(bg-blue-400 text-blue-950))\"></div>\n```\n\nRuns before Prettier or Tailwind JIT — so there are **no conflicts** with formatters or dev servers.\n\n---\n\n## 🛠️ Development\n\n```bash\npnpm install\npnpm run dev src/test.html\n```\n\nBuild production CLI:\n\n```bash\npnpm run build\n```\n\nTest globally:\n\n```bash\npnpm link --global\nprewind src/**/*.html\n```\n\n---\n\n## 🧭 Roadmap\n\n- [ ] Add config file support (`prewind.config.json`)\n- [ ] Add `--dry` and `--silent` modes\n\n---\n\n## 🧑‍💻 Author\n\n**art70x** — MIT License © 2025\n[GitHub Repository →](https://github.com/art70x/prewind)\n\n---\n\n> 🌀 _Prewind — write less, expand more_\n","readmeFilename":"README.md"}