Skip to content

preactjs/migrate-preact-x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Migrate Preact X

A collection of codemods to update your compatibility of preact to version X.

List of codemods

  • convert default imports into named imports
  • convert h pragma into createElement
  • Convert attributes & nodeName into props (we only change the ones we are 100% certain of)

Usage

npm i -g preact-migrate-x
preact-migrate-x [PATH_TO_SOURCE_DIR]

You can also use npx to run preact-migrate-x

npx preact-migrate-x [PATH_TO_SOURCE_DIR]

Notes

  • Once you run all the migrations check the diff and make sure that everything looks as expected. These fixers cover almost all cases we know of, but it's possible that some manual fixes can be required.
  • Although the migration will format your source code, it's likely that that the style is not consistent with the rest of your project. To make sure that everything is properly following your project's style guide, we recommend you apply a formatter such as prettier or clang-format after the edits are made.

License

MIT

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •