A minimal generator for LitElement Web Components –– npm init kcmr/lit-component
A minimal scaffold generator for Web Components with LitElement.
$ npm init kcmr/lit-component
Features:
Install it globally and run it:
$ npm i -g kcmr/lit-component
$ lit-component
Or run it directly without installation (get always the latest version from github):
$ npm init kcmr/lit-component
Component:
-n
, --name
Component name-d
, --description
Component description (used in description field inside package.json)-s
, --scope
Optional package scope (@my-company
)-i
, --[no-]install
Install dependencies (true
). Use --no-install
to skip dependency installation--silent
Use silent dependency installationCLI:
-h
, --help
Shows the CLI help-v
, --version
Shows the CLI versionpackage.json
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-component
property in a package.json
.lit-componentrc
(JSON or YAML format).lit-componentrc.json
.lit-componentrc.yaml
, .lit-componentrc.yml
.lit-componentrc.js
lit-component.config.js
Example config:
{
"scope": "@my-company",
"description": "An awesome component",
"install": false
}