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",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -14,7 +15,6 @@
|
||||||
"astro": "^1.4.2",
|
"astro": "^1.4.2",
|
||||||
"astro-reactive-form": "^0.1.1"
|
"astro-reactive-form": "^0.1.1"
|
||||||
},
|
},
|
||||||
"description": "``` npm create astro@latest -- --template minimal ```",
|
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -1,32 +1,34 @@
|
||||||
---
|
---
|
||||||
import { FormGroup, Submit } from 'astro-reactive-form/core';
|
import { FormGroup, Submit } from "astro-reactive-form/core";
|
||||||
import Form from 'astro-reactive-form';
|
import Form from "astro-reactive-form";
|
||||||
|
|
||||||
const form = new FormGroup([
|
const form = new FormGroup([
|
||||||
{
|
{
|
||||||
name: 'username',
|
name: "username",
|
||||||
label: 'Username',
|
label: "Username",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'password',
|
name: "password",
|
||||||
label: 'Password',
|
label: "Password",
|
||||||
type: 'password',
|
type: "password",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
form.name = 'Simple Form';
|
form.name = "Simple Form";
|
||||||
|
|
||||||
form.controls.push({
|
form.controls.push({
|
||||||
type: 'checkbox',
|
type: "checkbox",
|
||||||
name: 'is-awesome',
|
name: "is-awesome",
|
||||||
label: 'is Awesome?',
|
label: "is Awesome?",
|
||||||
|
labelPosition: "right",
|
||||||
|
value: "checked",
|
||||||
});
|
});
|
||||||
|
|
||||||
form.controls.push({
|
form.controls.push({
|
||||||
type: 'submit',
|
type: "submit",
|
||||||
name: 'submit',
|
name: "submit",
|
||||||
value: 'Submit',
|
value: "Submit",
|
||||||
callBack: () => console.log('hey'),
|
callBack: () => console.log("hey"),
|
||||||
} as Submit);
|
} 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"
|
"url": "https://ayco.io"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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"
|
"demo": "npm run dev -w demo"
|
||||||
},
|
},
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
@ -26,5 +21,8 @@
|
||||||
"demo",
|
"demo",
|
||||||
"packages/astro-reactive-form",
|
"packages/astro-reactive-form",
|
||||||
"packages/astro-reactive-validator"
|
"packages/astro-reactive-validator"
|
||||||
]
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"astro": "^1.4.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@ export interface Props {
|
||||||
const { formGroups } = Astro.props;
|
const { formGroups } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
|
{
|
||||||
<form>
|
<form>
|
||||||
{formGroups.map((group) => <FieldSet group={group} />)}
|
{formGroups?.map((group) => <FieldSet group={group} />)}
|
||||||
</form>
|
</form>
|
||||||
|
}
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"allowJs": true,
|
|
||||||
"noEmit": true
|
"noEmit": true
|
||||||
},
|
},
|
||||||
"include": ["index.ts", "src"],
|
|
||||||
"extends": "astro/tsconfigs/strictest"
|
"extends": "astro/tsconfigs/strictest"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue