Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eldoy/waveorb-generate
Generator for waveorb filters, actions, plugins, routes and templates.
https://github.com/eldoy/waveorb-generate
Last synced: 6 days ago
JSON representation
Generator for waveorb filters, actions, plugins, routes and templates.
- Host: GitHub
- URL: https://github.com/eldoy/waveorb-generate
- Owner: eldoy
- Created: 2020-02-10T10:36:05.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-22T11:58:11.000Z (about 2 months ago)
- Last Synced: 2024-10-12T23:06:59.254Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 1.12 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Waveorb generate
This package is part of the [Waveorb Javascript Jamstack web app development framework.](https://waveorb.com)
It is used to generate pages and actions for your web app. The files are meant as a starting point for further development.
Documentation for the generator is [found here.](https://waveorb.com/doc/command-line#generate)
### Usage
To generate both pages and actions for a model, use this command:
`waveorb generate model name`* input - name:string
* input - mail:email
* input - age:number (Last part is type)
* textarea - bio:text
* checkbox - hobby:check.digging.coding.boxing
* radio - type:radio.red.strong.blue
* select - meal:select.noodle.meat.soupMinimal validations will be added to actions.
Example:
```sh
waveorb generate model project/task name:select.hei.deg hobby:radio.hunting.barbecue affiliation:check.the_party.freedom
```The `.`-notation works for select, radio and checkboxes and are the different options.
To generate only pages: `waveorb generate pages name`
To generate only actions: `waveorb generate actions name`
You can rerun the command to overwrite your files.
### Nested resources
Nesting is supported by using name with slash:
`waveorb generate model parent/name`
`waveorb generate model grandparent/parent/name`It can be infinitely nested.
This adds
- parent ids to pages
- in form
- in url
- in links### Generate from file
As an example, add a file called `project.yml` to the `models` directory:
```yml
name: user/project
fields:
name: string
mail: email
age: number
bio: text
hobby: check.digging.coding.boxing
type: radio.red.strong.blue
meal: select.noodle.meat.soup
```Generate from file:
`waveorb generate file models/project.yml`Generate all in `models` dir:
`waveorb generate file models`MIT Licensed. Enjoy!