Skip to content

Commit 1175680

Browse files
committed
ReScript
1 parent e1fbbab commit 1175680

File tree

10 files changed

+157
-175
lines changed

10 files changed

+157
-175
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/cameraroll`
1+
# Changelog of `@rescript-react-native/cameraroll`
22

33
## 4.0.2 - 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: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# `@reason-react-native/cameraroll`
1+
# `@rescript-react-native/cameraroll`
22

3-
[![Build Status](https://github.com/reason-react-native/cameraroll/workflows/Build/badge.svg)](https://github.com/reason-react-native/cameraroll/actions)
4-
[![Version](https://img.shields.io/npm/v/@reason-react-native/cameraroll.svg)](https://www.npmjs.com/@reason-react-native/cameraroll)
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/cameraroll/workflows/Build/badge.svg)](https://github.com/rescript-react-native/cameraroll/actions)
4+
[![Version](https://img.shields.io/npm/v/@rescript-react-native/cameraroll.svg)](https://www.npmjs.com/@rescript-react-native/cameraroll)
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/cameraroll`](https://github.com/react-native-cameraroll/react-native-cameraroll).
99

1010
Exposed as `ReactNativeCameraRoll` module.
1111

12-
`@reason-react-native/cameraroll` X.y.\* means it's compatible with
12+
`@rescript-react-native/cameraroll` X.y.\* means it's compatible with
1313
`@react-native-community/cameraroll` 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/cameraroll
23+
npm install @rescript-react-native/cameraroll
2424
# or
25-
yarn add @reason-react-native/cameraroll
25+
yarn add @rescript-react-native/cameraroll
2626
```
2727

28-
`@reason-react-native/cameraroll` should be added to `bs-dependencies` in your
28+
`@rescript-react-native/cameraroll` 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/cameraroll"
38+
+ "@rescript-react-native/cameraroll"
3939
],
4040
//...
4141
}
@@ -51,7 +51,7 @@ Allows saving photos and videos to the Camera Roll or Photo Gallery, similar to
5151
The function will return the URI for the saved file as a string wrapped in a
5252
Promise.
5353

54-
```reason
54+
```rescript
5555
save: string => Js.Promise.t(string)
5656
```
5757

@@ -64,7 +64,7 @@ specified in a `saveOptions` object.
6464
The function will return the URI for the saved file as a string wrapped in a
6565
Promise.
6666

67-
```reason
67+
```rescript
6868
saveWithOptions: (string, saveOptions) => Js.Promise.t(string)
6969
```
7070

@@ -84,7 +84,7 @@ will be inferred to be a video.
8484
The function will return the URI for the saved file as a string wrapped in a
8585
Promise.
8686

87-
```reason
87+
```rescript
8888
saveToCameraRoll: string => Js.Promise.t(string)
8989
```
9090

@@ -97,7 +97,7 @@ one of the polymorphic variants `` `photo `` or `` `video ``.
9797
The function will return the URI for the saved file as a string wrapped in a
9898
Promise.
9999

100-
```reason
100+
```rescript
101101
saveToCameraRollWithType: (string, [ | `photo | `video]) => Js.Promise.t(string)
102102
```
103103

@@ -116,15 +116,15 @@ and base64 data URIs) or a local video file URI. The user will be presented with
116116
a dialog box that showing the asset(s) and asked for confirmation. This cannot
117117
be bypassed as per Apple Developer guidelines.
118118

119-
```reason
119+
```rescript
120120
deletePhotos: array(string) => Js.Promise.t(bool)
121121
```
122122

123123
### `getAlbums`
124124

125125
Returns a list of albums wrapped in a Promise.
126126

127-
```reason
127+
```rescript
128128
getAlbums: unit => Js.Promise.t(array(album))
129129
```
130130

@@ -133,7 +133,7 @@ getAlbums: unit => Js.Promise.t(array(album))
133133
Returns a list of albums of type specified in a `getAlbumsParams` object,
134134
wrapped in a Promise.
135135

136-
```reason
136+
```rescript
137137
getAlbums: getAlbumsParams => Js.Promise.t(array(album))
138138
```
139139

@@ -147,15 +147,15 @@ of type `array(photoIdentifier)`, where each `photoIdentifier` object would
147147
contain details of each photo or video matching parameters provided in the
148148
`getPhotosParam` object.
149149

150-
```reason
150+
```rescript
151151
getPhotos: getPhotosParams => Js.Promise.t(photoIdentifiersPage)
152152
```
153153

154154
## Types
155155

156156
### `album`
157157

158-
```reason
158+
```rescript
159159
type album = {
160160
title: string,
161161
count: int
@@ -166,7 +166,7 @@ type album = {
166166

167167
can be constructed with the constructor of the same name
168168

169-
```reason
169+
```rescript
170170
getAlbumsParams:
171171
(
172172
~assetType: [@bs.string] [
@@ -188,7 +188,7 @@ can be constructed with the constructor of the same name
188188
returned in a previous `getPhotos` call, under the `end_cursor` key contained
189189
in turn under the `page_info` key.
190190

191-
```reason
191+
```rescript
192192
getPhotosParams:
193193
(
194194
~first: int,
@@ -215,7 +215,7 @@ getPhotosParams:
215215

216216
### `image`
217217

218-
```reason
218+
```rescript
219219
type image = {
220220
filename: Js.Nullable.t(string),
221221
uri: string,
@@ -228,7 +228,7 @@ type image = {
228228

229229
### `location`
230230

231-
```reason
231+
```rescript
232232
type location = {
233233
latitude: Js.Nullable.t(float),
234234
longitude: Js.Nullable.t(float),
@@ -240,7 +240,7 @@ type location = {
240240

241241
### `node`
242242

243-
```reason
243+
```rescript
244244
type node = {
245245
[@bs.as "type"]
246246
_type: string,
@@ -254,7 +254,7 @@ type node = {
254254

255255
### `pageInfo`
256256

257-
```reason
257+
```rescript
258258
type pageInfo = {
259259
[@bs.as "has_next_page"]
260260
hasNextPage: bool,
@@ -268,7 +268,7 @@ type pageInfo = {
268268

269269
### `photoIdentifiersPage`
270270

271-
```reason
271+
```rescript
272272
type photoIdentifiersPage = {
273273
edges: array(photoIdentifier),
274274
[@bs.as "page_info"]
@@ -278,15 +278,15 @@ type photoIdentifiersPage = {
278278

279279
### `photoIdentifier`
280280

281-
```reason
281+
```rescript
282282
type photoIdentifier = {node}
283283
```
284284

285285
### `saveOptions`
286286

287287
can be constructed with the constructor of the same name
288288

289-
```reason
289+
```rescript
290290
saveOptions:
291291
(
292292
~_type: [@bs.string] [
@@ -301,7 +301,7 @@ saveOptions:
301301

302302
## Example
303303

304-
```reason
304+
```rescript
305305
open ReactNative;
306306
open ReactNativeCameraRoll;
307307
@@ -510,11 +510,11 @@ releases.
510510
## Contribute
511511

512512
Read the
513-
[contribution guidelines](https://github.com/reason-react-native/.github/blob/master/CONTRIBUTING.md)
513+
[contribution guidelines](https://github.com/rescript-react-native/.github/blob/master/CONTRIBUTING.md)
514514
before contributing.
515515

516516
## Code of Conduct
517517

518518
We want this community to be friendly and respectful to each other. Please read
519-
[our full code of conduct](https://github.com/reason-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
519+
[our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
520520
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/cameraroll",
3-
"refmt": 3,
4-
"reason": {
5-
"react-jsx": 3
6-
},
2+
"name": "@rescript-react-native/cameraroll",
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/cameraroll",
2+
"name": "@rescript-react-native/cameraroll",
33
"description": "ReScript bindings for @react-native-community/cameraroll.",
44
"version": "4.0.2",
55
"publishConfig": {
@@ -8,21 +8,19 @@
88
"peerDependencies": {
99
"@react-native-community/cameraroll": "^4.0.0"
1010
},
11-
"repository": "https://github.com/reason-react-native/cameraroll.git",
11+
"repository": "https://github.com/rescript-react-native/cameraroll.git",
1212
"author": "sgny (https://github.com/sgny)",
1313
"license": "MIT",
1414
"keywords": [
1515
"rescript",
16-
"reason",
17-
"reasonml",
18-
"bucklescript",
1916
"react-native",
2017
"cameraroll"
2118
],
2219
"files": [
2320
"*.md",
2421
"bsconfig.json",
25-
"src/**/*.re",
22+
"src/**/*.res",
23+
"src/**/*.resi",
2624
"src/**/*.js",
2725
"!src/**/*.bs.js"
2826
],
@@ -39,7 +37,7 @@
3937
"release": "npmpub"
4038
},
4139
"devDependencies": {
42-
"bs-platform": "^8.2.0",
40+
"bs-platform": "^9.0.0",
4341
"husky": "^4.0.0",
4442
"lint-staged": "^10.0.0",
4543
"npmpub": "^5.0.0",

0 commit comments

Comments
 (0)