This is a codemod that helps you to migrate a codebase from lit-element or lit-html to lit.
Take a look at the official migration guide to get a full overwiew of what needs to be done to migrate your codebase to lit.
npx jscodeshift -t lit-migration.js __testfixtures__/ --extensions=ts --parser=ts
For more options type jscodeshift --help or head over to the jscodeshift repo.
- It changes all
lit-elementandlit-htmlimport statements to import fromlit - It renames all occurrences of renamed Lit-APIs
- see all renamed APIs
- turn your directives into class based directives
- offer customization for formatting. Run your code formatter after using this tool.
There are probably usages of lit that were not considered.
Feel free to open issues or file PRs.