Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mununki/gatsby-reason-starter
A starter of Gatsby with ReasonML
https://github.com/mununki/gatsby-reason-starter
Last synced: 29 days ago
JSON representation
A starter of Gatsby with ReasonML
- Host: GitHub
- URL: https://github.com/mununki/gatsby-reason-starter
- Owner: mununki
- Created: 2020-08-21T04:41:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-25T00:53:16.000Z (over 4 years ago)
- Last Synced: 2024-04-24T03:22:04.309Z (9 months ago)
- Language: Reason
- Size: 198 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A starter of Gatsby + ReasonML
## How to add the ReasonML(based on `ReScript` toolchain)
### Install dependencies
```shell
$ npm i bs-platform reason-react
```### Create `bsconfig.json`
```json
{
"name": "your-project-name",
"reason": {
"react-jsx": 3
},
"bsc-flags": ["-bs-super-errors"],
"sources": [
{
"dir": "src",
"subdirs": true
}
],
"package-specs": [
{
"module": "es6",
"in-source": true
}
],
"suffix": ".bs.js",
"namespace": true,
"bs-dependencies": ["reason-react"],
"ppx-flags": [],
"refmt": 3
}
```### Add scripts in `package.json`
```json
...
"re:build": "bsb -make-world -clean-world",
"re:watch": "bsb -make-world -clean-world -w"
...
```## How to run (dev mode)
### Run `bsb` in watch mode
```shell
$ npm run re:watch
```### Run Gatsby in dev mode
```shell
$ npm run develop
```## How to build to static
### Build `*.re`
```shell
$ npm run re:build
```### Build Gatsby
```shell
$ npm run build
```