chore: clean up monorepo
This commit is contained in:
parent
c6dc470b07
commit
eddf262add
11 changed files with 395 additions and 391 deletions
19
demo/.gitignore
vendored
19
demo/.gitignore
vendored
|
@ -1,19 +0,0 @@
|
|||
# build output
|
||||
dist/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/minimal",
|
||||
"name": "demo-astro-reactive-form",
|
||||
"description": "Demo App for Astro Reactive Form",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
|
@ -14,7 +15,6 @@
|
|||
"astro": "^1.4.2",
|
||||
"astro-reactive-form": "^0.1.1"
|
||||
},
|
||||
"description": "``` npm create astro@latest -- --template minimal ```",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,32 +1,34 @@
|
|||
---
|
||||
import { FormGroup, Submit } from 'astro-reactive-form/core';
|
||||
import Form from 'astro-reactive-form';
|
||||
import { FormGroup, Submit } from "astro-reactive-form/core";
|
||||
import Form from "astro-reactive-form";
|
||||
|
||||
const form = new FormGroup([
|
||||
{
|
||||
name: 'username',
|
||||
label: 'Username',
|
||||
name: "username",
|
||||
label: "Username",
|
||||
},
|
||||
{
|
||||
name: 'password',
|
||||
label: 'Password',
|
||||
type: 'password',
|
||||
name: "password",
|
||||
label: "Password",
|
||||
type: "password",
|
||||
},
|
||||
]);
|
||||
|
||||
form.name = 'Simple Form';
|
||||
form.name = "Simple Form";
|
||||
|
||||
form.controls.push({
|
||||
type: 'checkbox',
|
||||
name: 'is-awesome',
|
||||
label: 'is Awesome?',
|
||||
type: "checkbox",
|
||||
name: "is-awesome",
|
||||
label: "is Awesome?",
|
||||
labelPosition: "right",
|
||||
value: "checked",
|
||||
});
|
||||
|
||||
form.controls.push({
|
||||
type: 'submit',
|
||||
name: 'submit',
|
||||
value: 'Submit',
|
||||
callBack: () => console.log('hey'),
|
||||
type: "submit",
|
||||
name: "submit",
|
||||
value: "Submit",
|
||||
callBack: () => console.log("hey"),
|
||||
} as Submit);
|
||||
---
|
||||
|
||||
|
|
681
package-lock.json
generated
681
package-lock.json
generated
File diff suppressed because it is too large
Load diff
10
package.json
10
package.json
|
@ -14,11 +14,6 @@
|
|||
"url": "https://ayco.io"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha --parallel --timeout 15000",
|
||||
"test:watch": "mocha --watch --parallel --timeout 15000",
|
||||
"format": "prettier -w .",
|
||||
"lint": "eslint . --ext .ts,.js",
|
||||
"lint:fix": "eslint --fix . --ext .ts,.js",
|
||||
"demo": "npm run dev -w demo"
|
||||
},
|
||||
"license": "ISC",
|
||||
|
@ -26,5 +21,8 @@
|
|||
"demo",
|
||||
"packages/astro-reactive-form",
|
||||
"packages/astro-reactive-validator"
|
||||
]
|
||||
],
|
||||
"dependencies": {
|
||||
"astro": "^1.4.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ export interface Props {
|
|||
const { formGroups } = Astro.props;
|
||||
---
|
||||
|
||||
<form>
|
||||
{formGroups.map((group) => <FieldSet group={group} />)}
|
||||
</form>
|
||||
{
|
||||
<form>
|
||||
{formGroups?.map((group) => <FieldSet group={group} />)}
|
||||
</form>
|
||||
}
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"module": "ESNext",
|
||||
"allowJs": true,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["index.ts", "src"],
|
||||
"extends": "astro/tsconfigs/strictest"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue