Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
domutala committed Jul 7, 2024
0 parents commit 7be4cdc
Show file tree
Hide file tree
Showing 31 changed files with 7,239 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
src
demos
dist/*.d.ts.map
84 changes: 84 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# formons

## install

```bash
# yarn
yarn add formons

# npm
npm install formons
```

## usage

```js
import { create, use } from "form";

const model = create({
schemas: [
{
key: "id",
onCreate: "generateUUID",

_validators: {
uuid: true,
required: true,
},

_interface: {
hidden: true,
},
},
{
key: "name",

_validators: {
string: true,
required: true,
},

_interface: {
type: "string",
},
},
{
key: "info",

_interface: {
type: "alert",
props: {
color: "info",
text: "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Vel laborum non voluptates rerum? Distinctio, delectus corrupti porro impedit vel animi debitis ab, eum corporis accusantium quod cum, dignissimos vero excepturi!",
},
},
},
{
key: "lien",

_validators: {
required: true,
regex: {
fn: "regex",
args: {
regex:
/^(https?:\/\/)?([\w-]+(\.[\w-]+)+)(\/[\w-]*)*(\?.*)?(#.*)?$/,
message: "must_be_url",
},
},
},

_interface: {
type: "url",
componentProps: {
label: "url",
},
},
},
],
watch: function (model) {
// do something
return model;
},
});
```
24 changes: 24 additions & 0 deletions demos/demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example
75 changes: 75 additions & 0 deletions demos/demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Nuxt 3 Minimal Starter

Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Make sure to install the dependencies:

```bash
# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev

# bun
bun run dev
```

## Production

Build the application for production:

```bash
# npm
npm run build

# pnpm
pnpm run build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:

```bash
# npm
npm run preview

# pnpm
pnpm run preview

# yarn
yarn preview

# bun
bun run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
Loading

0 comments on commit 7be4cdc

Please sign in to comment.