A CLI to convert WaveMaker Prefabs into WebComponents
The CLI requires & prompts the user for WaveMaker Prefab project path(Exported from WaveMaker).
The CLI can take them as paramaters,
* -s | --prefab-project-path
npx &
npx @wavemaker/webcomponents-cli -s /path/to/prefab/project
`Web Component Usage Guide
Accessing Properties, Methods, and Events
All properties, methods, and events are attached to the web component's DOM element. To interact with the component, you must first select the element in the DOM.
`
const webcomponent = .querySelector('webcomp-tagname');
`$3
You can retrieve or modify properties using:
`
webcomponent.propname;
`$3
Invoke methods using:
`
webcomponent.methodname();
`$3
To handle events, use the standard addEventListener method:
`
webcomponent.addEventListener('eventname', callBackMethod);
`$3
The web component may not be ready immediately. To ensure you access properties, methods and events only after initialization, listen for the 'init' event:
`
webcomponent.addEventListener('init', () => {
console.log('Web component initialized');
});
``