Skip to content

Commit 0711d11

Browse files
committed
[2.0.0] initial release
1 parent fa773ab commit 0711d11

File tree

14 files changed

+2020
-3
lines changed

14 files changed

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

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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog of `@reason-react-native/geolocation`
2+
3+
## 2.0.0 - 2020-04-02
4+
5+
Initial release

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

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,77 @@
1-
# geolocation
2-
ReasonML / BuckleScript bindings for @react-native-community/geolocation
1+
# BuckleScript bindings to @react-native-community/geolocation
2+
3+
[![Build Status](https://github.com/reason-react-native/geolocation/workflows/Build/badge.svg)](https://github.com/reason-react-native/geolocation/actions)
4+
[![Version](https://img.shields.io/npm/v/@reason-react-native/geolocation.svg)](https://www.npmjs.com/package/@reason-react-native/geolocation)
5+
6+
These are complete BuckleScript bindings to
7+
[`@reason-react-native/geolocation`](https://github.com/react-native-community/react-native-geolocation),
8+
in Reason syntax.
9+
10+
Version `x.y.z` of `@reason-react-native/geolocation` should be compatible with
11+
version `x.y.*` of `@react-native-community/geolocation`.
12+
13+
## Installation
14+
15+
With `yarn`:
16+
17+
```shell
18+
yarn add @reason-react-native/geolocation
19+
```
20+
21+
With `npm`:
22+
23+
```shell
24+
npm install @reason-react-native/geolocation
25+
```
26+
27+
`@react-native-community/geolocation` should be properly installed and linked.
28+
Please refer to the relevant
29+
[instructions](https://github.com/react-native-community/react-native-geolocation/blob/master/README.md).
30+
31+
Finally, `@reason-react-native/geolocation` should be added to `bs-dependencies`
32+
in `BuckleScript` configuration of the project (`bsconfig.json`). For example,
33+
34+
```json
35+
{
36+
...
37+
"bs-dependencies": ["reason-react", "reason-react-native", "@reason-react-native/geolocation"],
38+
...
39+
}
40+
```
41+
42+
## Note
43+
44+
On Android, this package uses the
45+
[android.location API](https://developer.android.com/reference/android/location/package-summary),
46+
which is slower and less accurate than the
47+
[Google Location Services API](https://developer.android.com/training/location/).
48+
While this may be addressed in the future, below alternatives already use the
49+
latter API:
50+
51+
- [react-native-geolocation-service](https://github.com/Agontuk/react-native-geolocation-service)
52+
- [react-native-location](https://github.com/timfpark/react-native-location)
53+
54+
## Use
55+
56+
Documentation is not available at this time.
57+
58+
---
59+
60+
## Changelog
61+
62+
Check the [changelog](./CHANGELOG.md) for more informations about recent
63+
releases.
64+
65+
---
66+
67+
## Contribute
68+
69+
Read the
70+
[contribution guidelines](https://github.com/reason-react-native/.github/blob/master/CONTRIBUTING.md)
71+
before contributing.
72+
73+
## Code of Conduct
74+
75+
We want this community to be friendly and respectful to each other. Please read
76+
[our full code of conduct](https://github.com/reason-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
77+
so that you can understand what actions will and will not be tolerated.

bsconfig.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "@reason-react-native/geolocation",
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", "-warn-error @a"],
19+
"bs-dependencies": []
20+
}

0 commit comments

Comments
 (0)