update-lit-imports
v1.0.0
Published
Update Lit imports from lit-element to lit etc
Downloads
82
Readme
update-lit-imports
A simple module to help with updating Lit from v1 to v2.
See https://lit.dev/docs/v2/releases/upgrade
Usage
import { updateLitImports } from 'update-lit-imports'
updateLitImports('./src/components/')
API
updateLitImports
Param: src - the folder relative from where script is called (not the where the script lives)
What is does
It does the following replacements in any .js or .mjs files:
lit-element --> lit lit-html/ --> lit/ lit-html --> lit/html.js
It does not resolve use of decorators, which must be manually updated.
https://lit.dev/docs/v2/releases/upgrade/#update-decorator-imports