diff --git a/README.md b/README.md new file mode 100644 index 0000000..b3a5ab7 --- /dev/null +++ b/README.md @@ -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 | diff --git a/demo/README.md b/demo/README.md index da4f712..9f80750 100644 --- a/demo/README.md +++ b/demo/README.md @@ -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` diff --git a/package.json b/package.json index e50e06a..70fb4fc 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "license": "ISC", "workspaces": [ "demo", - "packages/astro-reactive-form" + "packages/astro-reactive-form", + "packages/astro-reactive-validator" ] } diff --git a/packages/astro-reactive-form/README.md b/packages/astro-reactive-form/README.md index b754f50..0c13e20 100644 --- a/packages/astro-reactive-form/README.md +++ b/packages/astro-reactive-form/README.md @@ -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 = { diff --git a/packages/astro-reactive-form/package.json b/packages/astro-reactive-form/package.json index 4e7ff6e..94c1ad1 100644 --- a/packages/astro-reactive-form/package.json +++ b/packages/astro-reactive-form/package.json @@ -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", diff --git a/packages/astro-reactive-validator/package.json b/packages/astro-reactive-validator/package.json new file mode 100644 index 0000000..f80b8f7 --- /dev/null +++ b/packages/astro-reactive-validator/package.json @@ -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" +}