A minimal scaffold generator for Web Components with LitElement.
$ npm init kcmr/lit-componentFeatures:
- Uses Parcel bundler for the component's demo (dev server). Super fast build and reload!
- @open-wc/testing for unit tests (TDD style)
- Allows to import the component class without element registration. Define the tag as you like
Install it globally and run it:
$ npm i -g kcmr/lit-component
$ lit-componentOr run it directly without installation (get always the latest version from github):
$ npm init kcmr/lit-componentComponent:
-n,--nameComponent name-d,--descriptionComponent description (used in description field inside package.json)-s,--scopeOptional package scope (@my-company)-i,--[no-]installInstall dependencies (true). Use--no-installto skip dependency installation--silentUse silent dependency installation
CLI:
-h,--helpShows the CLI help-v,--versionShows the CLI version
The CLI will remember the choices of the last execution with your preferences about the package scope but you can also use configuration files or a specific property in a package.json file.
lit-componentproperty in apackage.json.lit-componentrc(JSON or YAML format).lit-componentrc.json.lit-componentrc.yaml,.lit-componentrc.yml.lit-componentrc.jslit-component.config.js
Example config:
{
"scope": "@my-company",
"description": "An awesome component",
"install": false
}