1.11.1 • Published 4 years ago

@furo/ui-builder v1.11.1

Weekly downloads
149
License
MIT
Repository
-
Last release
4 years ago

furo ui builder

Prequisits

If you have Go installed

simple-generator has to be installed. Quick installation: go get github.com/veith/simple-generator .

if not: https://golang.org/doc/install

Manual Installation

  • mkdir my-spec-project
  • cd my-spec-project
  • npm init
  • Run npm install --save-dev @furo/specs to install the tools.
  • Add a furo.spec.conf.json to the root folder of your spec project. An example of a config file can be found in the ~/node_modules/@furo/spec/ folder.

TIPP copy the example file, remove the packages, add your packages.

Usage of ui builder (furo.ui.spec.conf.json)

TIPP Add the scripts to your package.json so you can run npm run init_ui_spec , npm run build_ui_components,...

{ 
 "scripts": {
   "uib:init": "./node_modules/@furo/ui-builder/_scripts/init-ui-specs.js",
   "uib:generate": "./node_modules/@furo/ui-builder/_scripts/generate-components.js",
   "uib:watch": "npm-watch uib:generate"
 },
 "watch": {
   "uib:generate": {
    "patterns": [
      "ui_specs"
    ],
    "extensions": "u33e",
    "runOnChangeOnly": false
   }
  }
}

Config

  • path_to_simplegenerator Set the path to your simple-generator binary if you don't have a local environment e.g. ./bin/
  • spec_dir Path to your spec directory.
  • forms_spec_out Output path for your form specs
  • build_output_dir Build output path

Example furo.ui.spec.conf.json

{
  "spec_dir": "./specs",
  "ui_spec_out": "./ui_specs",
  "build_output_dir": "./generated_components",
  "generator_template": "./node_modules/@furo/ui-builder/_scripts/templates/lit.js.tmpl",
  "skip_spec": [
    ".*collection.type.spec",
    ".*entity.type.spec"
  ],
  "writeprotection": [
    "some-form.u33e"
  ],
  "hooks": {
    "service": [
      "node_modules/@furo/ui-builder/_scripts/hook-init-reference-search.js",
      "node_modules/@furo/ui-builder/_scripts/hook-init-reference-dropdown.js",
      "node_modules/@furo/ui-builder/_scripts/hook-init-update-action.js",
      "node_modules/@furo/ui-builder/_scripts/hook-init-update-panel.js"
    ],
    "type": [
      "node_modules/@furo/ui-builder/_scripts/hook-init-form.js",
      "node_modules/@furo/ui-builder/_scripts/hook-init-create-form.js",
      "node_modules/@furo/ui-builder/_scripts/hook-init-create-widget.js",
      "node_modules/@furo/ui-builder/_scripts/hook-init-display.js"
    ]
  },
  "hook": {
    "hook_init_form": {
      "replace": {
        "premium-premiumgui-form": {
          "with": "premium-field",
          "import_path": "../../src/components/form-fields/premium-field.js",
          "field_flags": ["condensed","double"]
        }
      },
      "default_form_size": "four",
      "default_field_flags": ["condensed","double"],
      "skip_fields_on_init" : ["id", "display_name"]
    }
  }
}
1.11.1

4 years ago

1.11.0

4 years ago

1.10.1

4 years ago

1.10.0

4 years ago

1.9.1

4 years ago

1.9.0

5 years ago

1.8.1

5 years ago

1.8.0

5 years ago

1.7.4

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.1.5

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago