portal-web-components

This project is created using Direflow

Usage no npm install needed!

<script type="module">
  import portalWebComponents from 'https://cdn.skypack.dev/portal-web-components';
</script>

README

This component was bootstrapped with Direflow.

Jolt Web Component

This project is created using Direflow

to install just yarn add @jolt-us/web-components

creating new web component:

  • create a new folder src/direflow-components/cool-component * notice the syntax
  • create index.tsx file and inside write
   import createWebComponent from "../../GlobalComponents/setup/createWebComponent";
   import CoolComponent from "./CoolComponent";
   
   
   export default createWebComponent("cool-component", CoolComponent)
  • and that is it create your file src/direflow-components/cool-component/CoolComponent.tsx
    and start develop your web-component.

debugging:

  • notice there is a public/index.html file. this file is for debuging purposes.
  • just add inside the body <body><cool-component /></body>
  • now run yarn dev and lok at http://localhost:3020 this file is on git ignore so we can change it as we like.
    if you do a change in that file that everyone should use.
    please remember to remove it from git ignore, commit it and put it again

deployment

  • run yarn build && yarn publish
  • go to jolt-public-web-app and increase the npm dependency version.