An open API service indexing awesome lists of open source software.

https://github.com/igorskyflyer/npm-astro-component

πŸš€ A CLI tool for bootstrapping Astro components with test-ready scaffolding, render logic, props, slots, and Vitest setup included. πŸ§ͺ
https://github.com/igorskyflyer/npm-astro-component

astro back-end component framework html igorskyflyer npm ssg test vitest

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

          


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](#-features)
- [Usage](#-usage)
- [Changelog](#-changelog)
- [Support](#-support)
- [License](#-license)
- [Related](#-related)
- [Author](#-author)




## πŸ€– 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:

```bash
npx "@igor.dvlpr/astro-component"
```

This will scaffold a test-ready Astro component suite into ``, 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:

```bash
npx "@igor.dvlpr/astro-component" --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](https://github.com/igorskyflyer/npm-astro-component/blob/main/CHANGELOG.md).




## πŸͺͺ License

Licensed under the [GPLv3 license](https://github.com/igorskyflyer/npm-astro-component/blob/main/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](https://www.npmjs.com/package/@igor.dvlpr/windev)

> _πŸƒ Provides ways of checking whether a path is a legacy Windows device. πŸ’Ύ_


[@igor.dvlpr/astro-post-excerpt](https://www.npmjs.com/package/@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](https://www.npmjs.com/package/@igor.dvlpr/astro-escaped-component)

> _πŸƒπŸ»β€β™‚οΈβ€βž‘οΈ An Astro component that holds only HTML-encoded content. πŸ“œ_


[@igor.dvlpr/pathexists](https://www.npmjs.com/package/@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](https://www.npmjs.com/package/@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_](https://github.com/igorskyflyer/)).