Skip to content

Commit 4d9051e

Browse files
authored
Initial commit
0 parents  commit 4d9051e

13 files changed

+3926
-0
lines changed

.editorconfig

+9
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

.github/workflows/build.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-node@v4
11+
with:
12+
node-version-file: ".node-version"
13+
14+
- uses: actions/cache@v4
15+
with:
16+
path: ~/.npm
17+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
18+
restore-keys: |
19+
${{ runner.os }}-node-
20+
21+
- run: npm install -g npm && npm --version
22+
23+
- run: npm ci
24+
25+
- run: npm test

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*.log
2+
3+
# macOS crap
4+
.DS_Store
5+
6+
# node
7+
node_modules
8+
9+
# ReScript artifacts
10+
# *.bs.js # we do want this files to ensure zero-cost
11+
.bsb.lock
12+
**/lib/bs
13+
**/lib/ocaml
14+
**/.merlin

.node-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.bs.js
2+
package.json

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog of `@rescript-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

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 @rescript-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

+102
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+
`rescript.json` `"namespace"` field (more on this below),
7+
- Update all occurences of
8+
9+
- `@rescript-react-native/__template__`
10+
- `https://github.com/rescript-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 `rescript.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+
# `@rescript-react-native/__template__`
27+
28+
[![Build Status](https://github.com/rescript-react-native/__template__/workflows/Build/badge.svg)](https://github.com/rescript-react-native/__template__/actions)
29+
[![Version](https://img.shields.io/npm/v/@rescript-react-native/__template__.svg)](https://www.npmjs.com/@rescript-react-native/__template__)
30+
[![ReScript Forum](https://img.shields.io/discourse/posts?color=e6484f&label=ReScript%20Forum&server=https%3A%2F%2Fforum.rescript-lang.org)](https://forum.rescript-lang.org/)
31+
32+
[ReScript](https://rescript-lang.org) bindings for
33+
[`react-native-XXXXXXXXXX`](https://github.com/OWNER/react-native-XXXXXXXXXX).
34+
35+
Exposed as `ReactNativeXxxxxxxxxx` module.
36+
37+
`@rescript-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 @rescript-react-native/__template__
49+
# or
50+
yarn add @rescript-react-native/__template__
51+
```
52+
53+
`@rescript-react-native/__template__` should be added to `bs-dependencies` in your
54+
`rescript.json`:
55+
56+
```diff
57+
{
58+
//...
59+
"bs-dependencies": [
60+
"@rescript/react",
61+
"rescript-react-native",
62+
// ...
63+
+ "@rescript-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/rescript-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/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
102+
so that you can understand what actions will and will not be tolerated.

0 commit comments

Comments
 (0)