0.10.1 • Published 11 months ago

waveorb-generate v0.10.1

Weekly downloads
173
License
MIT
Repository
github
Last release
11 months ago

Waveorb generate

This package is part of the Waveorb Javascript Jamstack web app development framework.

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.

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.soup

Minimal validations will be added to actions.

Example:

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:

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!

0.10.1

11 months ago

0.10.0

11 months ago

0.9.3

2 years ago

0.9.2

2 years ago

0.9.0

2 years ago

0.9.1

2 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.8.2

3 years ago

0.7.3

3 years ago

0.7.2

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.7

3 years ago

0.6.6

3 years ago

0.6.5

3 years ago

0.6.4

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.7

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.0

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.3.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago