Skip to content

A codemod to migrate to MobX-State-Tree 0.10 from previous versions

License

Notifications You must be signed in to change notification settings

mobxjs/mst-codemod-to-0.10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mst-codemod-to-0.10

A codemod to migrate to MobX-State-Tree 0.10 from previous versions

How to run the codemod?

The codemod is provided as npm package command line tool. It has been written using the TypeScript parser, so it will succefully support either TS or regular JavaScript source files.

To run the codemod, you need to first install it globally by npm install -g mst-codemod-to-0.10. After that, the mst-codemod-to-0.10 command will be available in your command line.

To perform the codemod, you need to call in your command line mst-codemod-to-0.10 followed by the filename you want to codemod. A .bak file with the original source will be created for backup purposes, and the file you provided will be updated to the new syntax! Have fun!

PS: You could also use npx instead of installing the codemod globally! :)

Downsides This codemod uses the TypeScript parser and printer, this means that your code style wont be preserved after the codemod.

If your setup already includes a tool like prettier, I'd recommend to run prettier after the codemod to update the file syntax style accordingly!

About

A codemod to migrate to MobX-State-Tree 0.10 from previous versions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published