Skip to content

Commit

Permalink
refactor: add neo (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
duguyihou authored Apr 16, 2024
1 parent 00148db commit c3dfd9c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ The [example app](/example/) demonstrates usage of the library. You need to run

It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.

If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/GradientExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-gradient`.
If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/GradientExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-neo-gradient`.

To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-gradient` under `Android`.
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-neo-gradient` under `Android`.

You can use various commands from the root directory to work with the project.

Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
<img src="https://github.com/duguyihou/react-native-gradient/assets/9347790/b0ecb56f-eb78-4aec-bf2e-0eb38b5a2605" width="393" height="881" />

# react-native-gradient
# react-native-neo-gradient

Gradient component for react native

## Features

- TypeScript support
- Written in SwiftUI and Jetpack Compose

## Installation

```sh
npm install react-native-gradient
npm install react-native-neo-gradient
```

## Usage

```js
import Gradient from "react-native-gradient";
import Gradient from "react-native-neo-gradient";

// ...

Expand Down
8 changes: 4 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ PODS:
- React-Mapbuffer (0.73.6):
- glog
- React-debug
- react-native-gradient (0.1.0):
- react-native-neo-gradient (0.1.0):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
Expand Down Expand Up @@ -1171,7 +1171,7 @@ DEPENDENCIES:
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector-modern`)
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
- react-native-gradient (from `../..`)
- react-native-neo-gradient (from `../..`)
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
Expand Down Expand Up @@ -1266,7 +1266,7 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/logger"
React-Mapbuffer:
:path: "../node_modules/react-native/ReactCommon"
react-native-gradient:
react-native-neo-gradient:
:path: "../.."
React-nativeconfig:
:path: "../node_modules/react-native/ReactCommon"
Expand Down Expand Up @@ -1351,7 +1351,7 @@ SPEC CHECKSUMS:
React-jsinspector: 85583ef014ce53d731a98c66a0e24496f7a83066
React-logger: 3eb80a977f0d9669468ef641a5e1fabbc50a09ec
React-Mapbuffer: 84ea43c6c6232049135b1550b8c60b2faac19fab
react-native-gradient: a129b9115301ea10a2ba0bcb0c833d998dce1a40
react-native-neo-gradient: 38e5ef11d46470081ef07dbd99495cac36f7bbbb
React-nativeconfig: b4d4e9901d4cabb57be63053fd2aa6086eb3c85f
React-NativeModulesApple: cd26e56d56350e123da0c1e3e4c76cb58a05e1ee
React-perflogger: 5f49905de275bac07ac7ea7f575a70611fa988f2
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-native-gradient",
"name": "react-native-neo-gradient",
"version": "0.1.0",
"description": "gradient component for react native",
"main": "lib/commonjs/index",
Expand Down Expand Up @@ -41,14 +41,14 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/duguyihou/react-native-gradient.git"
"url": "git+https://github.com/duguyihou/react-native-neo-gradient.git"
},
"author": "duguyihou <[email protected]> (https://github.com/duguyihou)",
"license": "MIT",
"bugs": {
"url": "https://github.com/duguyihou/react-native-gradient/issues"
"url": "https://github.com/duguyihou/react-native-neo-gradient/issues"
},
"homepage": "https://github.com/duguyihou/react-native-gradient#readme",
"homepage": "https://github.com/duguyihou/react-native-neo-gradient#readme",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'

Pod::Spec.new do |s|
s.name = "react-native-gradient"
s.name = "react-native-neo-gradient"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]

s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/duguyihou/react-native-gradient.git", :tag => "#{s.version}" }
s.source = { :git => "https://github.com/duguyihou/react-native-neo-gradient.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m,mm,swift}"

Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10829,9 +10829,9 @@ __metadata:
languageName: unknown
linkType: soft

"react-native-gradient@workspace:.":
"react-native-neo-gradient@workspace:.":
version: 0.0.0-use.local
resolution: "react-native-gradient@workspace:."
resolution: "react-native-neo-gradient@workspace:."
dependencies:
"@commitlint/config-conventional": ^17.0.2
"@evilmartians/lefthook": ^1.5.0
Expand Down

0 comments on commit c3dfd9c

Please sign in to comment.