Maglove Widgets
Riot Widgets used for MagLoft TypeLoft Editor.
Description
maglove-widgets is a rendering library for widgets created with the TypeLoft 2.0 Editor.
It is using webcomponents using riot.js
(e.g. <container-widget ...>
) to create self-contained widgets that encapsulate UI and functionality of widgets.
Example
<!DOCTYPE html>
<html>
<head>
<script type="module">
import widgets from './widgets.js'
widgets.mount(document.querySelector("page-widget"))
</script>
</head>
<body>
<page-widget widget>
<paragraph-widget>Lorem Ipsum</paragraph-widget>
</page-widget>
</body>
</html>
Installation
$ yarn install
Development
# build, watch
(for developing the widget as a linked npm package)
$ yarn watch
# build, watch and start development server on 127.0.0.1:8080
(for developing the widget by itself)
$ yarn serve
# create distribution files in `dist/widgets.js`
$ yarn build
# lint javascript source files
$ yarn lint