native-component-lit-element
v1.0.0
Published
web component base on lit-element
Downloads
1
Maintainers
Readme
nv-element
✨ 基于lit-element编写的去框架化轻量级组件
install
yarn install
start dev
yarn start
Runs the app in the development mode. Open http://localhost:8080 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
build for esm
yarn run ems-build
Builds the lib for production to the build/dist
folder.
Note: this is build for esmodule, no bundle!
build for umd
yarn run umd-build
Builds the lib for production to the dist
folder.
Note: this is build for umd. if u wanna run the code in outdated browser, u would be prefer to use this command after npm run esm-build
Directives
In case you need to add a directive like classMap
you should add the extension to the import:
import { classMap } from "lit-html/directives/class-map.js";