-
-
Notifications
You must be signed in to change notification settings - Fork 252
Add section to easily migrate an entire folder of code into "Migrate from BuckleScript/Reason" page #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…from BuckleScript/Reason" page
might be even worth mentioning to check in the compiled JS files first (compiled from the original .re files) before doing the conversion, bc checking the JS diffs is more reliable than just checking the new ReScript code. Or to say it differently: if your compiled output doesn't change when compiling the files with the new syntax, you can be 100% sure your conversion didn't break any code |
That's a very good idea. I just added some instructions to do this comparison, tell me if that 's ok! |
This is nice! I'd just finished converting pupilfirst's ReasonML to ReScript and I'd written a small Ruby script to help automate the conversion. One thing that could possibly be included in the total conversion snippet - for it to match |
Co-authored-by: Hari Gopal <mail@harigopal.in>
@harigopal not sure that's very necessary, a simple copy/paste with a 2 characters changes is acceptable I guess :D It's a "complicated" already line of code! |
for f in src/**/*.re; do; node_modules/.bin/bsc -format $f > ${f%.re}.res && rm -f $f; done; Pushed as a PR rescript-lang/rescript-lang.org#121
Thanks for your contribution! |
Feel free to rephrase :) |
Because I think it's useful (and safe as soon as you have versioned codebase.