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. π§ͺ
- Host: GitHub
- URL: https://github.com/igorskyflyer/npm-astro-component
- Owner: igorskyflyer
- License: mit
- Created: 2025-08-07T15:03:16.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-08-09T15:52:26.000Z (11 months ago)
- Last Synced: 2025-08-09T17:35:25.808Z (11 months ago)
- Topics: astro, back-end, component, framework, html, igorskyflyer, npm, ssg, test, vitest
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@igor.dvlpr/astro-component
- Size: 74.2 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Support: SUPPORT.md
Awesome Lists containing this project
README
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. β
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/)).