portal-web-components
v1.0.1
Published
This project is created using Direflow
Downloads
3
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 athttp://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.