Skip to content

Commit a46c5ff

Browse files
authored
Migration from React Native repo (#1)
Migration from React Native repo
2 parents e7e9f63 + 384a0a1 commit a46c5ff

File tree

72 files changed

+13556
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+13556
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
# OSX
3+
#
4+
.DS_Store
5+
6+
# node.js
7+
#
8+
node_modules/
9+
npm-debug.log
10+
yarn-error.log
11+
12+
13+
# Xcode
14+
#
15+
build/
16+
*.pbxuser
17+
!default.pbxuser
18+
*.mode1v3
19+
!default.mode1v3
20+
*.mode2v3
21+
!default.mode2v3
22+
*.perspectivev3
23+
!default.perspectivev3
24+
xcuserdata
25+
*.xccheckout
26+
*.moved-aside
27+
DerivedData
28+
*.hmap
29+
*.ipa
30+
*.xcuserstate
31+
project.xcworkspace
32+
33+
34+
# Android/IntelliJ
35+
#
36+
build/
37+
.idea
38+
.gradle
39+
local.properties
40+
*.iml
41+
42+
# BUCK
43+
buck-out/
44+
\.buckd/
45+
*.keystore

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2015-present, Facebook, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 112 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,112 @@
1-
# react-native-progress-view
1+
# react-native-progressview
2+
3+
Use `ProgressViewIOS` to render a UIProgressView on iOS.
4+
It was part of React Native Core.
5+
6+
## Getting started
7+
8+
`$ npm install react-native-progressview --save`
9+
10+
### Mostly automatic installation
11+
12+
`$ react-native link react-native-progressview`
13+
14+
### Manual installation
15+
16+
#### iOS
17+
18+
1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`
19+
2. Go to `node_modules``react-native-progressview` and add `RNCProgressview.xcodeproj`
20+
3. In XCode, in the project navigator, select your project. Add `libRNCProgressview.a` to your project's `Build Phases``Link Binary With Libraries`
21+
4. Run your project (`Cmd+R`)<
22+
23+
## Usage
24+
25+
```javascript
26+
import RNCProgressview from 'react-native-progressview';
27+
28+
## Reference
29+
30+
### Props
31+
32+
* [View props...](view.md#props)
33+
34+
- [`progress`](progressviewios.md#progress)
35+
- [`progressImage`](progressviewios.md#progressimage)
36+
- [`progressTintColor`](progressviewios.md#progresstintcolor)
37+
- [`progressViewStyle`](progressviewios.md#progressviewstyle)
38+
- [`trackImage`](progressviewios.md#trackimage)
39+
- [`trackTintColor`](progressviewios.md#tracktintcolor)
40+
41+
---
42+
43+
# Reference
44+
45+
## Props
46+
47+
### `progress`
48+
49+
The progress value (between 0 and 1).
50+
51+
| Type | Required |
52+
| ------ | -------- |
53+
| number | No |
54+
55+
---
56+
57+
### `progressImage`
58+
59+
A stretchable image to display as the progress bar.
60+
61+
| Type | Required |
62+
| ---------------------- | -------- |
63+
| Image.propTypes.source | No |
64+
65+
---
66+
67+
### `progressTintColor`
68+
69+
The tint color of the progress bar itself.
70+
71+
| Type | Required |
72+
| ------ | -------- |
73+
| string | No |
74+
75+
---
76+
77+
### `progressViewStyle`
78+
79+
The progress bar style.
80+
81+
| Type | Required |
82+
| ---------------------- | -------- |
83+
| enum('default', 'bar') | No |
84+
85+
---
86+
87+
### `trackImage`
88+
89+
A stretchable image to display behind the progress bar.
90+
91+
| Type | Required |
92+
| ---------------------- | -------- |
93+
| Image.propTypes.source | No |
94+
95+
---
96+
97+
### `trackTintColor`
98+
99+
The tint color of the progress bar track.
100+
101+
| Type | Required |
102+
| ------ | -------- |
103+
| string | No |
104+
```
105+
106+
## Contributors
107+
108+
- [Kaiden Sin](https://github.com/kdenz) - [Passionate Product Maker and Coder](http://linkedin.com/in/kaiden)
109+
110+
## License
111+
112+
The library is released under the MIT license. For more information see [`LICENSE`](/LICENSE).

android/build.gradle

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
buildscript {
3+
repositories {
4+
jcenter()
5+
}
6+
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:1.3.1'
9+
}
10+
}
11+
12+
apply plugin: 'com.android.library'
13+
14+
android {
15+
compileSdkVersion 23
16+
buildToolsVersion "23.0.1"
17+
18+
defaultConfig {
19+
minSdkVersion 16
20+
targetSdkVersion 22
21+
versionCode 1
22+
versionName "1.0"
23+
}
24+
lintOptions {
25+
abortOnError false
26+
}
27+
}
28+
29+
repositories {
30+
mavenCentral()
31+
}
32+
33+
dependencies {
34+
compile 'com.facebook.react:react-native:+'
35+
}
36+

android/src/main/AndroidManifest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.reactnativecommunity.progressview">
4+
5+
</manifest>
6+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
package com.reactnativecommunity.progressview;
3+
4+
import com.facebook.react.bridge.ReactApplicationContext;
5+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
6+
import com.facebook.react.bridge.ReactMethod;
7+
import com.facebook.react.bridge.Callback;
8+
9+
public class RNCProgressviewModule extends ReactContextBaseJavaModule {
10+
11+
private final ReactApplicationContext reactContext;
12+
13+
public RNCProgressviewModule(ReactApplicationContext reactContext) {
14+
super(reactContext);
15+
this.reactContext = reactContext;
16+
}
17+
18+
@Override
19+
public String getName() {
20+
return "RNCProgressview";
21+
}
22+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
package com.reactnativecommunity.progressview;
3+
4+
import java.util.Arrays;
5+
import java.util.Collections;
6+
import java.util.List;
7+
8+
import com.facebook.react.ReactPackage;
9+
import com.facebook.react.bridge.NativeModule;
10+
import com.facebook.react.bridge.ReactApplicationContext;
11+
import com.facebook.react.uimanager.ViewManager;
12+
import com.facebook.react.bridge.JavaScriptModule;
13+
public class RNCProgressviewPackage implements ReactPackage {
14+
@Override
15+
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
16+
return Arrays.<NativeModule>asList(new RNCProgressviewModule(reactContext));
17+
}
18+
19+
// Deprecated from RN 0.47
20+
public List<Class<? extends JavaScriptModule>> createJSModules() {
21+
return Collections.emptyList();
22+
}
23+
24+
@Override
25+
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
26+
return Collections.emptyList();
27+
}
28+
}

babel.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
presets: ["module:metro-react-native-babel-preset"],
3+
plugins: [
4+
[
5+
"module-resolver",
6+
{
7+
alias: {
8+
"@react-native-community/progressview": "./js"
9+
},
10+
cwd: "babelrc"
11+
}
12+
]
13+
]
14+
};

example/.buckconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

0 commit comments

Comments
 (0)