Skip to content

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

Merged
merged 7 commits into from
Jan 4, 2021

Conversation

MoOx
Copy link
Contributor

@MoOx MoOx commented Nov 25, 2020

Because I think it's useful (and safe as soon as you have versioned codebase.

@ryyppy
Copy link
Member

ryyppy commented Nov 25, 2020

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

@MoOx
Copy link
Contributor Author

MoOx commented Nov 25, 2020

That's a very good idea. I just added some instructions to do this comparison, tell me if that 's ok!

@harigopal
Copy link
Contributor

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 .rei files to convert them to .resi.

Co-authored-by: Hari Gopal <mail@harigopal.in>
@MoOx
Copy link
Contributor Author

MoOx commented Nov 25, 2020

@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!

MoOx added a commit to MoOx/LifeTime that referenced this pull request Dec 16, 2020
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
@ryyppy
Copy link
Member

ryyppy commented Jan 4, 2021

Thanks for your contribution!
I think i will merge this for now, but I will probably rephrase a few things later, if that is okay

@ryyppy ryyppy merged commit 5e6a95a into rescript-lang:master Jan 4, 2021
@MoOx MoOx deleted the patch-1 branch January 4, 2021 07:24
@MoOx
Copy link
Contributor Author

MoOx commented Jan 4, 2021

Feel free to rephrase :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants