Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 1.25 KB

README.md

File metadata and controls

28 lines (23 loc) · 1.25 KB

lit-migration

What is this

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.

Example usage

npx jscodeshift -t lit-migration.js __testfixtures__/ --extensions=ts --parser=ts

For more options type jscodeshift --help or head over to the jscodeshift repo.

What lit-migration does

  • It changes all lit-element and lit-html import statements to import from lit
  • It renames all occurrences of renamed Lit-APIs

lit-migration does NOT

  • turn your directives into class based directives
  • offer customization for formatting. Run your code formatter after using this tool.

Contributing

There are probably usages of lit that were not considered. Feel free to open issues or file PRs.

References