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.tsxfile 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.tsxand start develop your web-component.
debugging:
notice there is a
public/index.htmlfile. this file is for debuging purposes.just add inside the
body<body><cool-component /></body>now run
yarn devand lok athttp://localhost:3020this 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-appand increase the npm dependency version.
