Skip to content

Commit a6f5426

Browse files
committed
ReScript
1 parent 4f8b02f commit a6f5426

File tree

10 files changed

+47
-55
lines changed

10 files changed

+47
-55
lines changed

.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ node_modules
99
# npm unused lock file (we use yarn.lock)
1010
package-lock.json
1111

12-
# ReScript / Reason / Ocaml artifacts
13-
#*.bs.js # we do want this files to ensure zero-cost
12+
# ReScript artifacts
13+
# *.bs.js # we do want this files to ensure zero-cost
1414
.bsb.lock
1515
**/lib/bs
1616
**/lib/ocaml

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Changelog of `@reason-react-native/clipboard`
1+
# Changelog of `@rescript-react-native/clipboard`
22

33
## 1.5.1 - 2020-11-17
44

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 @reason-react-native contributors
3+
Copyright (c) 2019 @rescript-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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# `@reason-react-native/clipboard`
1+
# `@rescript-react-native/clipboard`
22

3-
[![Build Status](https://github.com/reason-react-native/clipboard/workflows/Build/badge.svg)](https://github.com/reason-react-native/clipboard/actions)
4-
[![Version](https://img.shields.io/npm/v/@reason-react-native/clipboard.svg)](https://www.npmjs.com/@reason-react-native/clipboard)
5-
[![Chat](https://img.shields.io/discord/235176658175262720.svg?logo=discord&colorb=blue)](https://reason-react-native.github.io/discord/)
3+
[![Build Status](https://github.com/rescript-react-native/clipboard/workflows/Build/badge.svg)](https://github.com/rescript-react-native/clipboard/actions)
4+
[![Version](https://img.shields.io/npm/v/@rescript-react-native/clipboard.svg)](https://www.npmjs.com/@rescript-react-native/clipboard)
5+
[![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/)
66

7-
[ReScript](https://rescript-lang.org) / [Reason](https://reasonml.github.io) bindings for
7+
[ReScript](https://rescript-lang.org) bindings for
88
[`@react-native-community/clipboard`](https://github.com/react-native-clipboard/clipboard).
99

1010
Exposed as `ReactNativeClipboard` module.
1111

12-
`@reason-react-native/clipboard` X.y.\* means it's compatible with
12+
`@rescript-react-native/clipboard` X.y.\* means it's compatible with
1313
`@react-native-community/clipboard` X.y.\*
1414

1515
## Installation
@@ -20,22 +20,22 @@ is properly installed & configured by following their installation instructions,
2020
you can install the bindings:
2121

2222
```console
23-
npm install @reason-react-native/clipboard
23+
npm install @rescript-react-native/clipboard
2424
# or
25-
yarn add @reason-react-native/clipboard
25+
yarn add @rescript-react-native/clipboard
2626
```
2727

28-
`@reason-react-native/clipboard` should be added to `bs-dependencies` in your
28+
`@rescript-react-native/clipboard` should be added to `bs-dependencies` in your
2929
`bsconfig.json`:
3030

3131
```diff
3232
{
3333
//...
3434
"bs-dependencies": [
35-
"reason-react",
36-
"reason-react-native",
35+
"@rescript/react",
36+
"rescript-react-native",
3737
// ...
38-
+ "@reason-react-native/clipboard"
38+
+ "@rescript-react-native/clipboard"
3939
],
4040
//...
4141
}
@@ -50,29 +50,29 @@ yarn add @reason-react-native/clipboard
5050
To attempt reading content from the Clipboard; resolves to a `string` if
5151
successful.
5252

53-
```reason
53+
```rescript
5454
getString: unit => Js.Promise.t(string)
5555
```
5656

5757
### `setString`
5858

5959
To copy a `string` to the Clipbard.
6060

61-
```reason
61+
```rescript
6262
setString: string => unit
6363
```
6464

6565
## Hooks
6666

6767
### `useClipboard`
6868

69-
```reason
69+
```rescript
7070
useClipboard: unit => (string, string => unit)
7171
```
7272

7373
#### Example
7474

75-
```reason
75+
```rescript
7676
open ReactNative;
7777
7878
ReactNativeClipboard.setString("initial value");
@@ -99,11 +99,11 @@ releases.
9999
## Contribute
100100

101101
Read the
102-
[contribution guidelines](https://github.com/reason-react-native/.github/blob/master/CONTRIBUTING.md)
102+
[contribution guidelines](https://github.com/rescript-react-native/.github/blob/master/CONTRIBUTING.md)
103103
before contributing.
104104

105105
## Code of Conduct
106106

107107
We want this community to be friendly and respectful to each other. Please read
108-
[our full code of conduct](https://github.com/reason-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
108+
[our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
109109
so that you can understand what actions will and will not be tolerated.

bsconfig.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
2-
"name": "@reason-react-native/clipboard",
3-
"refmt": 3,
4-
"reason": {
5-
"react-jsx": 3
6-
},
2+
"name": "@rescript-react-native/clipboard",
3+
"reason": { "react-jsx": 3 },
74
"package-specs": {
85
"module": "commonjs",
96
"in-source": true

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@reason-react-native/clipboard",
2+
"name": "@rescript-react-native/clipboard",
33
"description": "ReScript bindings for @react-native-community/clipboard.",
44
"version": "1.5.1",
55
"publishConfig": {
@@ -8,20 +8,18 @@
88
"peerDependencies": {
99
"@react-native-community/clipboard": "^1.5.0"
1010
},
11-
"repository": "https://github.com/reason-react-native/clipboard.git",
11+
"repository": "https://github.com/rescript-react-native/clipboard.git",
1212
"license": "MIT",
1313
"keywords": [
1414
"rescript",
15-
"reason",
16-
"reasonml",
17-
"bucklescript",
1815
"react-native",
1916
"clipboard"
2017
],
2118
"files": [
2219
"*.md",
2320
"bsconfig.json",
24-
"src/**/*.re",
21+
"src/**/*.res",
22+
"src/**/*.resi",
2523
"src/**/*.js",
2624
"!src/**/*.bs.js"
2725
],
@@ -38,7 +36,7 @@
3836
"release": "npmpub"
3937
},
4038
"devDependencies": {
41-
"bs-platform": "^8.2.0",
39+
"bs-platform": "^9.0.0",
4240
"husky": "^4.0.0",
4341
"lint-staged": "^10.0.0",
4442
"npmpub": "^5.0.0",

src/ReactNativeClipboard.re

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/ReactNativeClipboard.res

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@module("@react-native-community/clipboard") @scope("default")
2+
external getString: unit => Js.Promise.t<string> = "getString"
3+
4+
@module("@react-native-community/clipboard") @scope("default")
5+
external setString: string => unit = "setString"
6+
7+
@module("@react-native-community/clipboard") @scope("default")
8+
external hasString: unit => bool = "hasString"
9+
10+
@module("@react-native-community/clipboard") @scope("default")
11+
external hasURL: unit => bool = "hasURL"
12+
13+
@module("@react-native-community/clipboard")
14+
external useClipboard: unit => (string, string => unit) = "useClipboard"

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ braces@^3.0.1:
251251
dependencies:
252252
fill-range "^7.0.1"
253253

254-
bs-platform@^8.2.0:
255-
version "8.3.2"
256-
resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-8.3.2.tgz#c307f1cc2d2397c3d088c7f3b62e9f493283cdcf"
257-
integrity sha512-iOTi5JIlNPoCPq31NS9ET79FLyCpwTL2JZbgHz35LzY9Bch1iDtbBR3FVGhRbjphxelAP4fLlFONfUNp5Y3a5g==
254+
bs-platform@^9.0.0:
255+
version "9.0.2"
256+
resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-9.0.2.tgz#a6eac70eb8924a322556dacaccbfbc9b2a0d3a37"
257+
integrity sha512-Ye9JqJ4Oa7mcjjoOVRYI8Uc2Cf8N7jQLWDcdUplY7996d/YErSR7WitmV7XnSwr4EvdrbwjEsg1NxNjUQv3ChA==
258258

259259
callsites@^3.0.0:
260260
version "3.1.0"

0 commit comments

Comments
 (0)