@wmfs/form-maker

Automatically generates a form and state machine based on a yaml.

Usage no npm install needed!

<script type="module">
  import wmfsFormMaker from 'https://cdn.skypack.dev/@wmfs/form-maker';
</script>

README

Form-maker

Tymly Package npm (scoped) CircleCI codecov CodeFactor Dependabot badge Commitizen friendly JavaScript Style Guide license

Generates a form and state machine in JSON format based on a given yaml.

Tests

$ npm test

Usage

const formMaker = require('form-maker')

formMaker (
  {
    namespace: 'test', // the namespace of the model you want to save form data to
    formName: 'peopleForm', // name of the form
    modelName: 'peopleModel', // name of the model that you want to save form data to
    yamlPath: 'path/to/yaml/file'
  },
  function (err, result) {
    // result.form - holds the generated form object
    // result.stateMachine - holds the generated state machine object
  }
)

License

MIT