Migrate an Existing BuckleScript Project to bs-platform v7

Thomas Greco
InstructorThomas Greco

Share this video with your friends

Send Tweet
Published 2 years ago
Updated 10 months ago

The BuckleScript compiler recently reached a new milestone with version 7. In this lesson, we walk through the process of upgrading an existing application to the latest version using yarn (or npm).


BuckleScript Blog - What's new in v7

BuckleScript Blog - Holiday Release Post

!BuckleScript Docs

Instructor: [0:01] If we take a look at our bs-platform package, which holds our BuckleScript internals, we'll see that we have version 5.2. Although this is fine, version 7 was recently released. It provides us with more features, and it utilizes a newer version of OCaml than before and gives us advantages that we would be foolish to miss out on.

[0:35] In order to upgrade existing BuckleScript projects, you'll need to run yarn add, and use the --dev flag, and then specify bs-platform at version 7. For those using npm, same thing, just with npm.

[1:06] We'll see that we have successfully grabbed the latest stable version of BuckleScript. To test this out, let's run it. We'll see that everything is compiling just fine.

[1:35] All right, this is pretty great, but as a wise person once said, "Type correctness does not guarantee program correctness." Let's test this out in the browser and make sure that nothing has changed. OK, web package running fine. If we go back to our beautiful UI, we'll see that our clickers are just as we left them.