4.0.1 • Published 2 years ago

@webtekteam/elementor-widget-cli v4.0.1

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
2 years ago

elementor-widget-cli

Cli generator for Elementor widgets based on Webtek conventions

Compatibility

Sage: 9, 10

Implementations

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.

Installation

npm i -g bitbucket:webtekteam/elementor-widget-cli

Usage

The command must be run from the theme directory, not from the wordpress root or inside other directories.

Example: ew PascalName

OptionTypeDescription
namestringname in pascal case of the widget
-y / --jsbooldoes the widget requires Javascript configuration?
-f / --forceboolflag to force override of destination files
-i / --implint (1-4)implementation to use
-v / --versionshow CLI version
-h / --helpshow CLI help

What it does

  • Generate php widget class
  • Generate scss file
  • Generate js file (based on flag)
  • Register widget class in PluginInit.php
  • Register entry in assets.json file