Skip to content

Instantly share code, notes, and snippets.

@wokalski
Last active May 6, 2017 16:45
Show Gist options
  • Save wokalski/2d8010322debfbda9ca6759a1bcdfbf5 to your computer and use it in GitHub Desktop.
Save wokalski/2d8010322debfbda9ca6759a1bcdfbf5 to your computer and use it in GitHub Desktop.
Minimal setup for react-native with reason
{
"name": "name",
"bs-dependencies": ["reason-react", "bs-react-native"],
"sources": {
"dir": "ml",
},
"generate-merlin" : true
}

With the config above Bucklescript will look for your Reason code in ./ml directory of your project. Keep in mind that it's not recursive so it won't include subdirectories.

It assumes that you have npm or yarn installed.

After creating a directory and adding bsconfig.json and package.json run yarn/npm install.

The guide on setting up the environment is [here](https://facebook.github.io/reason/tools.html].

{
"name": "name",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"start-ml": "bsb -clean-world -make-world -w"
},
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.43.4",
},
"devDependencies": {
"bs-react-native": "https://github.com/BuckleTypes/bs-react-native.git",
"bs-platform": "^1.7.3",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment