uiengine-adapter-html

0.13.0 • Public • Published

UIengine template adapter for HTML

🚦 State: Production ready

Configuration

Plain and simple:

adapters:
  html: uiengine-adapter-html

With options:

adapters:
  html:
    module: uiengine-adapter-html
    options:
      basedir: ./src/components
      debug: true

The basedir option allows for referencing includes with an absolute path.

In addition to that there is the option debug for a more detailed output in case of rendering errors.

Variables

You can reference variables with the JavaScript template literal syntax:

<div>${myData.variable}</div>

Given the context { myData: { variable: 'Test' } } this would render like

<div>Test</div>

Includes

You can include other html templates/components using the SSI include command:

<body>
  <!--#include file="header.html" -->
  <div>main content</div>
  <!--#include file="footer.html" -->
</body>

Variables and includes can also be combined:

<body>
  <!--#include file="${myIncludeFile}" -->
</body>

Package Sidebar

Install

npm i uiengine-adapter-html

Weekly Downloads

3

Version

0.13.0

License

MIT

Unpacked Size

4.33 kB

Total Files

5

Last publish

Collaborators

  • dennisreimann