Skip to content

πŸš€ A CLI tool for bootstrapping Astro components with test-ready scaffolding, render logic, props, slots, and Vitest setup included. πŸ§ͺ

License

Notifications You must be signed in to change notification settings

igorskyflyer/npm-astro-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Icon of Astro Component

Astro Component


πŸš€ A CLI tool for bootstrapping Astro components with test-ready scaffolding, render logic, props, slots, and Vitest setup included. πŸ§ͺ


πŸ“ƒ Table of Contents



πŸ€– Features

  • ⚑ Instantly scaffolds Astro .astro components 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> --dry

You'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

I work hard for every project, including this one and your support means a lot to me!
Consider buying me a coffee. β˜•

Donate to igorskyflyer

Thank you for supporting my efforts! πŸ™πŸ˜Š


🧬 Related

@igor.dvlpr/windev

πŸƒ 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. πŸ“œ


@igor.dvlpr/pathexists

🧲 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).

About

πŸš€ A CLI tool for bootstrapping Astro components with test-ready scaffolding, render logic, props, slots, and Vitest setup included. πŸ§ͺ

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project