Skip to content

Commit 347df0f

Browse files
committed
Apply template
1 parent 5969643 commit 347df0f

12 files changed

+2169
-54
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

.gitattributes

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

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
- 8.x
13+
- 10.x
14+
- 12.x
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: Install
23+
run: |
24+
yarn install \
25+
--non-interactive \
26+
--frozen-lockfile
27+
- name: Test
28+
run: yarn test
29+
env:
30+
CI: true

.gitignore

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
# Ocaml / Reason / BuckleScript artifacts
2-
.bsb.lock
3-
**/lib/bs
4-
**/lib/ocaml
5-
**/.merlin
1+
*.log
62

7-
# macos crap
3+
# macOS crap
84
.DS_Store
5+
96
# node
107
node_modules
8+
119
# npm unused lock file (we use yarn.lock)
12-
package-lock.json
10+
package-lock.json
11+
12+
# Ocaml / Reason / BuckleScript 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

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

.prettierignore

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

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Changelog of `@reason-react-native/slider`

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 @reason-react-native
3+
Copyright (c) 2019 @reason-react-native contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+64-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,64 @@
1-
# slider
2-
ReasonML / BuckleScript bindings for @react-native-community/slider
1+
# `@reason-react-native/slider`
2+
3+
[![Build Status](https://github.com/reason-react-native/slider/workflows/Build/badge.svg)](https://github.com/reason-react-native/slider/actions)
4+
[![Version](https://img.shields.io/npm/v/@reason-react-native/slider.svg)](https://www.npmjs.com/@reason-react-native/slider)
5+
[![Chat](https://img.shields.io/discord/235176658175262720.svg?logo=discord&colorb=blue)](https://reasonml-community.github.io/reason-react-native/discord/)
6+
7+
[ReasonML](https://reasonml.github.io) /
8+
[BuckleScript](https://bucklescript.github.io) bindings for
9+
[`@react-native-community/slider`](https://github.com/react-native-community/react-native-slider).
10+
11+
Exposed as `ReactNativeSomething` module.
12+
13+
`@reason-react-native/slider` X.y._ means it's compatible with
14+
`@react-native-community/slider` X.y._
15+
16+
## Installation
17+
18+
When
19+
[`@react-native-community/slider`](`https://github.com/react-native-community/react-native-slider`)
20+
is properly installed & configured by following their installation instructions,
21+
you can install the bindings:
22+
23+
```console
24+
npm install @reason-react-native/slider
25+
# or
26+
yarn add @reason-react-native/slider
27+
```
28+
29+
`@reason-react-native/slider` should be added to `bs-dependencies` in your
30+
`bsconfig.json`. Something like
31+
32+
```diff
33+
{
34+
//...
35+
"bs-dependencies": [
36+
"reason-react",
37+
"reason-react-native",
38+
// ...
39+
+ "@reason-react-native/slider"
40+
],
41+
//...
42+
}
43+
```
44+
45+
---
46+
47+
## Changelog
48+
49+
Check the [changelog](./CHANGELOG.md) for more informations about recent
50+
releases.
51+
52+
---
53+
54+
## Contribute
55+
56+
Read the
57+
[contribution guidelines](https://github.com/reason-react-native/.github/blob/master/CONTRIBUTING.md)
58+
before contributing.
59+
60+
## Code of Conduct
61+
62+
We want this community to be friendly and respectful to each other. Please read
63+
[our full code of conduct](https://github.com/reason-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
64+
so that you can understand what actions will and will not be tolerated.

package.json

+42-16
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{
22
"name": "@reason-react-native/slider",
3-
"version": "0.0.1",
3+
"version": "0.0.0",
44
"publishConfig": {
55
"access": "public"
66
},
7-
"author": "broerjuang (https://github.com/broerjuang)",
7+
"peerDependencies": {
8+
"reason-react": "^0.7.0",
9+
"reason-react-native": ">=0.60.0",
10+
"@react-native-community/slider": "^2.0.0"
11+
},
812
"repository": "https://github.com/reason-react-native/slider.git",
913
"license": "MIT",
1014
"keywords": [
1115
"reason",
1216
"reasonml",
1317
"bucklescript",
14-
"react-native",
15-
"react-native-slider",
16-
"slider"
18+
"react-native"
1719
],
1820
"files": [
1921
"*",
@@ -24,19 +26,43 @@
2426
"!lib/ocaml"
2527
],
2628
"scripts": {
27-
"start": "bsb -make-world -w",
28-
"build": "bsb -make-world",
29-
"clean": "bsb -clean-world",
30-
"test": "bsb -clean-world -make-world"
29+
"format:most": "prettier --write \"**/*.{md,json,js,css}\"",
30+
"format:re": "find . -name \"*.re\" -or -name \"*.rei\" | grep -v \"node_modules\" | xargs bsrefmt --in-place",
31+
"format": "yarn format:most && yarn format:re",
32+
"re:start": "bsb -make-world -w",
33+
"re:build": "bsb -make-world",
34+
"re:clean-build": "bsb -clean-world -make-world",
35+
"start": "yarn re:start",
36+
"build": "yarn re:build",
37+
"test": "yarn re:clean-build",
38+
"release": "npmpub"
3139
},
3240
"devDependencies": {
33-
"@react-native-community/slider": "^2.0.0",
34-
"bs-platform": "^5.0.4",
35-
"reason-react": ">=0.7.0",
36-
"reason-react-native": "^0.60.0"
41+
"bs-platform": "^5.2.0",
42+
"husky": "^1.3.0",
43+
"lint-staged": "^8.1.0",
44+
"npmpub": "^5.0.0",
45+
"prettier": "^1.18.0",
46+
"reason-react": "^0.7.0",
47+
"reason-react-native": "^0.61.0"
3748
},
38-
"peerDependencies": {
39-
"@react-native-community/slider": "^2.0.0",
40-
"reason-react": ">=0.7.0"
49+
"prettier": {
50+
"trailingComma": "all",
51+
"proseWrap": "always"
52+
},
53+
"lint-staged": {
54+
"*.{md,json,js,css}": [
55+
"prettier --write",
56+
"git add"
57+
],
58+
"*.{re,rei}": [
59+
"bsrefmt --in-place",
60+
"git add"
61+
]
62+
},
63+
"husky": {
64+
"hooks": {
65+
"pre-commit": "lint-staged"
66+
}
4167
}
4268
}

src/ReactNativeSlider.re

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ external make:
1414
~onValueChange: int => unit=?,
1515
~testID: string=?,
1616
~children: React.element=?,
17-
// IOS Props
17+
// iOS Props
1818
~maximumTrackImage: ReactNative.Image.Source.t=?,
1919
~minimumTrackImage: ReactNative.Image.Source.t=?,
2020
~thumbImage: ReactNative.Image.Source.t=?,
@@ -71,4 +71,4 @@ external make:
7171
~onMagicTap: unit => unit=?
7272
) =>
7373
React.element =
74-
"@react-native-community/slider";
74+
"@react-native-community/slider";

0 commit comments

Comments
 (0)