@igor.dvlpr/astro-component
v1.1.0
Published
🚀 A CLI tool for bootstrapping Astro components with test-ready scaffolding, render logic, props, slots, and Vitest setup included. 🧪
Maintainers
Readme
📃 Table of Contents
🤖 Features
- ⚡ Instantly scaffolds Astro
.astrocomponents with prop typing - 🧪 Generates Vitest-compatible test files with a DOM setup
- 🧩 Supports automatic folder structuring and consistent naming conventions
- 🛠️ Optional flags for dry-run, overwrite protection, and verbose output
- 🌌 Light-weight and zero-config - just run and go
🕵🏼 Usage
Bootstrap Astro components into a target directory with zero config:
npx "@igor.dvlpr/astro-component" <dest>This will scaffold a test-ready Astro component suite into <dest>, complete with:
- 🚀 Component and entrypoint code
- 🧪 Vitest setup
- 🧩 DOM environment
- ⚙️ Render logic
- 📦 Props and slots
- 🧼 Clean file structure
To preview the generated files without writing anything, use the --dry flag:
npx "@igor.dvlpr/astro-component" <dest> --dryYou'll get a full log of what would be created, ideal for safe inspection before committing.
📝 Changelog
📑 The changelog is available here: CHANGELOG.md.
🪪 License
Licensed under the MIT license which is available here, MIT license.
💖 Support
🧬 Related
🍃 Provides ways of checking whether a path is a legacy Windows device. 💾
@igor.dvlpr/astro-post-excerpt
⭐ An Astro component that renders post excerpts for your Astro blog - directly from your Markdown and MDX files. Astro v2+ collections are supported as well! 💎
@igor.dvlpr/astro-escaped-component
🏃🏻♂️➡️ An Astro component that holds only HTML-encoded content. 📜
🧲 Provides ways of properly checking if a path exists inside a given array of files/directories both on Windows and UNIX-like operating systems. 🗺
@igor.dvlpr/astro-easynav-button
🧭 Add an easy-to-use navigational button (jump to top/bottom) to your Astro site. 🔼
👨🏻💻 Author
Created by Igor Dimitrijević (@igorskyflyer).
