Skip to content

Commit a05bd47

Browse files
committed
Initial commit
0 parents  commit a05bd47

File tree

14 files changed

+1710
-0
lines changed

14 files changed

+1710
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# https://EditorConfig.org
2+
root = true
3+
4+
[*]
5+
end_of_line = lf
6+
insert_final_newline = true
7+
charset = utf-8
8+
indent_style = space
9+
indent_size = 2

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Tell github that .re and .rei files are Reason, sometimes recognized as C/C++
2+
*.re linguist-language=Reason
3+
*.rei linguist-language=Reason

.github/workflows/build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version:
12+
- 10.x
13+
- 12.x
14+
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- name: Install
22+
run: |
23+
yarn install \
24+
--non-interactive \
25+
--frozen-lockfile
26+
- name: Test
27+
run: yarn test
28+
env:
29+
CI: true

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*.log
2+
3+
# macOS crap
4+
.DS_Store
5+
6+
# node
7+
node_modules
8+
9+
# npm unused lock file (we use yarn.lock)
10+
package-lock.json
11+
12+
# ReScript / Reason / Ocaml artifacts
13+
#*.bs.js # we do want this files to ensure zero-cost
14+
.bsb.lock
15+
**/lib/bs
16+
**/lib/ocaml
17+
**/.merlin

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.bs.js
2+
package.json

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog of `@reason-react-native/__template__`
2+
3+
## X.Y.Z - 20YY-MM-DD
4+
5+
Short & concise description
6+
7+
### 💥 Breaking changes
8+
9+
- Something, in [1234567](<link to commit on github>) by @<usename>
10+
11+
### 🐛 Fixes
12+
13+
- Something else, in [1234567](<link to commit on github>) by @<usename>
14+
15+
### Internal changes
16+
17+
(If worth mentioning)

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 @reason-react-native contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
## How to use this template
2+
3+
- ⚠️ **Don't fork this repository.** Use the "Use this template" green GitHub
4+
button.
5+
- Put your bindings in `src/ReactNativeXxxxxxxxxx` & rename accordingly or use
6+
`bsconfig.json` `"namespace"` field (more on this below),
7+
- Update all occurences of
8+
9+
- `@reason-react-native/__template__`
10+
- `https://github.com/reason-react-native/__template__`
11+
- `__template__`
12+
- `react-native-XXXXXXXXXX`
13+
- `https://github.com/OWNER/react-native-XXXXXXXXXX`
14+
- `ReactNativeXxxxxxxxxx`. If you have more than a file exposed, you should
15+
consider using ReScript custom namespace by adjusting `bsconfig.json`
16+
and adding a `"namespace": "react-native-something"` (note that it will be
17+
converted to `ReactNativeXxxxxxxxxx`)
18+
19+
- Add your `react-native-XXXXXXXXXX` (adjusted) in `peerDependencies`
20+
& `devDependencies` section
21+
- Adjust the changelog (and/or clean it)
22+
- Remove this part ⬆ & keep everything below ⬇
23+
24+
---
25+
26+
# `@reason-react-native/__template__`
27+
28+
[![Build Status](https://github.com/reason-react-native/__template__/workflows/Build/badge.svg)](https://github.com/reason-react-native/__template__/actions)
29+
[![Version](https://img.shields.io/npm/v/@reason-react-native/__template__.svg)](https://www.npmjs.com/@reason-react-native/__template__)
30+
[![Chat](https://img.shields.io/discord/235176658175262720.svg?logo=discord&colorb=blue)](https://reason-react-native.github.io/discord/)
31+
32+
[ReScript](https://rescript-lang.org) / [Reason](https://reasonml.github.io) bindings for
33+
[`react-native-XXXXXXXXXX`](https://github.com/OWNER/react-native-XXXXXXXXXX).
34+
35+
Exposed as `ReactNativeXxxxxxxxxx` module.
36+
37+
`@reason-react-native/__template__` X.y.\* means it's compatible with
38+
`react-native-XXXXXXXXXX` X.y.\*
39+
40+
## Installation
41+
42+
When
43+
[`react-native-XXXXXXXXXX`](https://github.com/OWNER/react-native-XXXXXXXXXX)
44+
is properly installed & configured by following their installation instructions,
45+
you can install the bindings:
46+
47+
```console
48+
npm install @reason-react-native/__template__
49+
# or
50+
yarn add @reason-react-native/__template__
51+
```
52+
53+
`@reason-react-native/__template__` should be added to `bs-dependencies` in your
54+
`bsconfig.json`:
55+
56+
```diff
57+
{
58+
//...
59+
"bs-dependencies": [
60+
"reason-react",
61+
"reason-react-native",
62+
// ...
63+
+ "@reason-react-native/__template__"
64+
],
65+
//...
66+
}
67+
```
68+
69+
## Usage
70+
71+
### Types
72+
73+
#### `ReactNativeXxxxxxxxxx.t`
74+
75+
...
76+
77+
### Methods
78+
79+
#### `ReactNativeXxxxxxxxxx.method`
80+
81+
...
82+
83+
---
84+
85+
## Changelog
86+
87+
Check the [changelog](./CHANGELOG.md) for more informations about recent
88+
releases.
89+
90+
---
91+
92+
## Contribute
93+
94+
Read the
95+
[contribution guidelines](https://github.com/reason-react-native/.github/blob/master/CONTRIBUTING.md)
96+
before contributing.
97+
98+
## Code of Conduct
99+
100+
We want this community to be friendly and respectful to each other. Please read
101+
[our full code of conduct](https://github.com/reason-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
102+
so that you can understand what actions will and will not be tolerated.

bsconfig.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "@reason-react-native/__template__",
3+
"refmt": 3,
4+
"reason": {
5+
"react-jsx": 3
6+
},
7+
"package-specs": {
8+
"module": "commonjs",
9+
"in-source": true
10+
},
11+
"suffix": ".bs.js",
12+
"sources": [
13+
{
14+
"dir": "src",
15+
"subdirs": false
16+
}
17+
],
18+
"bsc-flags": ["-bs-no-version-header"],
19+
"warnings": {
20+
"error": true
21+
},
22+
"bs-dependencies": []
23+
}

0 commit comments

Comments
 (0)