Skip to content

Commit

Permalink
ReScript
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed May 3, 2021
1 parent ab9e2a7 commit ecb4df7
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 70 deletions.
3 changes: 0 additions & 3 deletions .gitattributes

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ node_modules
# npm unused lock file (we use yarn.lock)
package-lock.json

# ReScript / Reason / Ocaml artifacts
#*.bs.js # we do want this files to ensure zero-cost
# ReScript artifacts
# *.bs.js # we do want this files to ensure zero-cost
.bsb.lock
**/lib/bs
**/lib/ocaml
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changelog of `@reason-react-native/linear-gradient`
# Changelog of `@rescript-react-native/linear-gradient`

## 2.5.7 - 2020-11-17

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 @reason-react-native contributors
Copyright (c) 2019 @rescript-react-native contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# `@reason-react-native/linear-gradient`
# `@rescript-react-native/linear-gradient`

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

[ReScript](https://rescript-lang.org) / [Reason](https://reasonml.github.io) bindings for
[ReScript](https://rescript-lang.org) bindings for
[`react-native-linear-gradient`](https://github.com/react-native-linear-gradient/react-native-linear-gradient).

Exposed as `ReactNativeLinearGradient` module.

`@reason-react-native/linear-gradient` X.y.\* means it's compatible with
`@rescript-react-native/linear-gradient` X.y.\* means it's compatible with
`react-native-linear-gradient` X.y.\*

## Installation
Expand All @@ -20,30 +20,30 @@ is properly installed & configured by following their installation instructions,
you can install the bindings:

```console
npm install @reason-react-native/linear-gradient
npm install @rescript-react-native/linear-gradient
# or
yarn add @reason-react-native/linear-gradient
yarn add @rescript-react-native/linear-gradient
```

`@reason-react-native/linear-gradient` should be added to `bs-dependencies` in
`@rescript-react-native/linear-gradient` should be added to `bs-dependencies` in
your `bsconfig.json`:

```diff
{
//...
"bs-dependencies": [
"reason-react",
"reason-react-native",
"@rescript/react",
"rescript-react-native",
// ...
+ "@reason-react-native/linear-gradient"
+ "@rescript-react-native/linear-gradient"
],
//...
}
```

## Usage

```reason
```rescript
open ReactNative
module MyApp = {
Expand Down Expand Up @@ -76,11 +76,11 @@ releases.
## Contribute

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

## Code of Conduct

We want this community to be friendly and respectful to each other. Please read
[our full code of conduct](https://github.com/reason-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
[our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
so that you can understand what actions will and will not be tolerated.
9 changes: 3 additions & 6 deletions bsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"name": "@reason-react-native/linear-gradient",
"refmt": 3,
"reason": {
"react-jsx": 3
},
"name": "@rescript-react-native/linear-gradient",
"reason": { "react-jsx": 3 },
"package-specs": {
"module": "commonjs",
"in-source": true
Expand All @@ -19,5 +16,5 @@
"warnings": {
"error": true
},
"bs-dependencies": ["reason-react", "reason-react-native"]
"bs-dependencies": ["@rescript/react", "rescript-react-native"]
}
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@reason-react-native/linear-gradient",
"name": "@rescript-react-native/linear-gradient",
"description": "ReScript bindings for react-native-linear-gradient.",
"version": "2.5.7",
"publishConfig": {
Expand All @@ -8,19 +8,17 @@
"peerDependencies": {
"react-native-linear-gradient": "2.5.6"
},
"repository": "https://github.com/reason-react-native/linear-gradient.git",
"repository": "https://github.com/rescript-react-native/linear-gradient.git",
"license": "MIT",
"keywords": [
"rescript",
"reason",
"reasonml",
"bucklescript",
"react-native"
],
"files": [
"*.md",
"bsconfig.json",
"src/**/*.re",
"src/**/*.res",
"src/**/*.resi",
"src/**/*.js",
"!src/**/*.bs.js"
],
Expand All @@ -37,14 +35,14 @@
"release": "npmpub"
},
"devDependencies": {
"bs-platform": "^8.2.0",
"bs-platform": "^9.0.0",
"husky": "^4.0.0",
"lint-staged": "^10.0.0",
"npmpub": "^5.0.0",
"prettier": "^2.0.0",
"react-native-linear-gradient": "2.5.6",
"reason-react": "^0.9.0",
"reason-react-native": "^0.63.0"
"@rescript/react": "^0.10.0",
"rescript-react-native": "^0.64.3"
},
"prettier": {
"trailingComma": "all"
Expand Down
19 changes: 0 additions & 19 deletions src/ReactNativeLinearGradient.re

This file was deleted.

16 changes: 16 additions & 0 deletions src/ReactNativeLinearGradient.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
type position

@obj external position: (~x: float, ~y: float, unit) => position = ""

@module("react-native-linear-gradient") @react.component
external make: (
~style: ReactNative.Style.t=?,
~colors: array<string>,
~locations: array<float>=?,
~children: React.element,
~start: position=?,
~_end: position=?,
~angleCenter: position=?,
~angle: float=?,
~useAngle: bool=?,
) => React.element = "default"
28 changes: 14 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@
dependencies:
"@types/node" ">= 8"

"@rescript/react@^0.10.0":
version "0.10.2"
resolved "https://registry.yarnpkg.com/@rescript/react/-/react-0.10.2.tgz#170d2a5ff34ad09cd614d92467d5efad95202794"
integrity sha512-Qe21P4WnrmrbhbEMQ4dpaXC1/iMMc7JmqjuSpZouSP+s41K5dCXUGY9sds30gajU74lSfJdG2PzSDYcNAcDyVA==

"@sindresorhus/df@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@sindresorhus/df/-/df-1.0.1.tgz#c69b66f52f6fcdd287c807df210305dbaf78500d"
Expand Down Expand Up @@ -251,10 +256,10 @@ braces@^3.0.1:
dependencies:
fill-range "^7.0.1"

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

callsites@^3.0.0:
version "3.1.0"
Expand Down Expand Up @@ -1109,21 +1114,16 @@ readjson@^2.0.1:
dependencies:
try-catch "^3.0.0"

reason-react-native@^0.63.0:
version "0.63.0"
resolved "https://registry.yarnpkg.com/reason-react-native/-/reason-react-native-0.63.0.tgz#08de85136a41809b9a66cac066d4ea6975406000"
integrity sha512-rE1OOph5Jxceost2ahdvX+VXJ2RPNyefX9FMXa/OXgqmLKjFeZuyVOySUj41UoohOYyKmZWbgansDGccwYrdUQ==

reason-react@^0.9.0:
version "0.9.1"
resolved "https://registry.yarnpkg.com/reason-react/-/reason-react-0.9.1.tgz#30a887158200b659aa03e2d75ff4cc54dc462bb0"
integrity sha512-nlH0O2TDy9KzOLOW+vlEQk4ExHOeciyzFdoLcsmmiit6hx6H5+CVDrwJ+8aiaLT/kqK5xFOjy4PS7PftWz4plA==

regenerator-runtime@^0.13.4:
version "0.13.5"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697"
integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==

rescript-react-native@^0.64.3:
version "0.64.3"
resolved "https://registry.yarnpkg.com/rescript-react-native/-/rescript-react-native-0.64.3.tgz#8fd11a2681cfdd65c02f0ff620186e5adf0c6854"
integrity sha512-PjGDkV3RYiCTk4hCZyaKtZJV69By0AmJuzWyuHZONdeCB0q3DwjVJtA73gu6+jBrdl0OWon6UdXaVRXhhR47cQ==

resolve-from@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
Expand Down

0 comments on commit ecb4df7

Please sign in to comment.