Cli generator for Elementor widgets based on Webtek conventions
Sage: 9, 10
Use flag -i 5
with Sage 10 and entrypoints.json file for assets.
Use flag -i 4
with Sage 10.
Use flag -i 3
with Sage 9 and Elementor 3.5 and newer.
For previous Elementor versions use flag -i 2
of this package.
npm i -g bitbucket:webtekteam/elementor-widget-cli
The command must be run from the theme directory, not from the wordpress root or inside other directories.
Example: ew PascalName
Option | Type | Description |
---|---|---|
[name] | string | name in pascal case of the widget |
-y / --js | bool | does the widget requires Javascript configuration? |
-f / --force | bool | flag to force override of destination files |
-i / --impl | int (1-5) | implementation to use |
-v / --version | show CLI version | |
-h / --help | show CLI help |
- Generate php widget class
- Generate scss file
- Generate js file (based on flag)
- Register widget class in PluginInit.php
- Register entry in assets.json or entrypoints.json file