chore: initial validator library; monorepo readme

This commit is contained in:
Ayo 2022-10-01 14:31:32 +02:00
parent c1f9716d8b
commit 76e57c5fd5
6 changed files with 45 additions and 46 deletions

10
README.md Normal file
View file

@ -0,0 +1,10 @@
# Astro Reactive Form library 🔥
Monorepo of components and utilities for building reactive Forms with Astro
## Packages
| Package | Version |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| [astro-reactive-form](https://github.com/ayoayco/astro-reactive-form/tree/main/packages/astro-reactive-form) | [![npm](https://img.shields.io/npm/v/astro-reactive-form)](https://www.npmjs.com/package/astro-reactive-form) |
| astro-reactive-validator | 🛠 in-progress |

View file

@ -1,45 +1,6 @@
# Astro Starter Kit: Minimal
# Demo App for Astro Reactive Form 🔥
```
npm create astro@latest -- --template minimal
```
To start the app:
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🚀 Project Structure
Inside of your Astro project, you'll see the following folders and files:
```
/
├── public/
├── src/
│ └── pages/
│ └── index.astro
└── package.json
```
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the `public/` directory.
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :--------------------- | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro --help` | Get help using the Astro CLI |
## 👀 Want to learn more?
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
1. `npm i`
1. `npm run dev`

View file

@ -24,6 +24,7 @@
"license": "ISC",
"workspaces": [
"demo",
"packages/astro-reactive-form"
"packages/astro-reactive-form",
"packages/astro-reactive-validator"
]
}

View file

@ -19,7 +19,8 @@ npm i astro-reactive-form
```astro
---
import Form, { FormControl, FormGroup } from 'astro-reactive-form';
import type { FormControl, FormGroup } from 'astro-reactive-form/core';
import Form from 'astro-reactive-form';
// example of a form control
const radio: FormControl = {

View file

@ -1,7 +1,7 @@
{
"name": "astro-reactive-form",
"description": "The Reactive Form component for Astro 🔥",
"version": "0.1.1",
"version": "0.1.2",
"repository": "https://github.com/ayoayco/astro-reactive-form",
"homepage": "https://ayco.io/showcase/astro-reactive-form",
"type": "module",

View file

@ -0,0 +1,26 @@
{
"name": "astro-reactive-validator",
"version": "0.0.0",
"description": "Validation Library for Astro Reactive Form 🔥",
"main": "index.js",
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ayoayco/astro-reactive-form.git"
},
"keywords": [
"astro-components",
"ui",
"form",
"validation"
],
"author": "Ayo Ayco",
"license": "ISC",
"bugs": {
"url": "https://github.com/ayoayco/astro-reactive-form/issues"
},
"homepage": "https://github.com/ayoayco/astro-reactive-form#readme"
}