2.1.3 • Published 2 months ago

@open-pioneer/runtime v2.1.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 months ago

@open-pioneer/runtime

Implements the runtime environment for open pioneer trails apps.

Quick start

Import the createCustomElement function from this package to create your application as a Web Component:

// my-app/app.js
import { createCustomElement } from "@open-pioneer/runtime";
import * as appMetadata from "open-pioneer:app";
import { AppUI } from "./AppUI";

const Element = createCustomElement({
    component: AppUI,
    appMetadata
});

customElements.define("my-app", Element);

In this example, Element is a custom web component class registered as <my-app>. The application renders the AppUI (a react component) and automatically contains services, styles etc. its package dependencies. HTML sites or JavaScript code can now instantiate the application by creating a DOM-Element:

<!-- some-site/index.html -->
<!doctype html>
<html>
    <body>
        <!-- Contains the app once the script has been loaded -->
        <my-app></my-app>
        <script type="module" src="/apps/my-app/app.ts"></script>
    </body>
</html>

License

Apache-2.0 (see LICENSE file)

2.1.3

2 months ago

2.1.2

3 months ago

2.1.1

3 months ago

2.1.0

4 months ago

2.0.2

5 months ago

2.0.1

5 months ago

1.0.2

8 months ago

1.1.0

8 months ago

1.0.1

9 months ago

2.0.0

6 months ago

1.0.0

11 months ago

0.1.5

12 months ago

0.1.4

12 months ago

0.1.3

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago