Skip to content

Commit baae775

Browse files
authored
Chore/unify package json (#49)
1 parent 3bf8289 commit baae775

28 files changed

+786
-5349
lines changed

.circleci/config.yml

Lines changed: 91 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
1-
# -------------------------
2-
# ALIASES
3-
# -------------------------
4-
1+
# ALIASES
52
aliases:
6-
# CACHE
7-
- &restore-gradle-cache
8-
keys:
9-
- gradle-cache-{{ checksum "android/build.gradle" }}-{{ checksum "example/android/build.gradle" }}-{{ checksum "example/android/app/build.gradle" }}
10-
- &save-gradle-cache
11-
paths:
12-
- ~/.gradle
13-
key: gradle-cache-{{ checksum "android/build.gradle" }}-{{ checksum "example/android/build.gradle" }}-{{ checksum "example/android/app/build.gradle" }}
14-
15-
# ANALYSE
16-
- &eslint
17-
name: ESLint Checks
18-
command: yarn lint
3+
# CACHE
4+
- &restore-gradle-cache
5+
keys:
6+
- gradle-cache-{{ checksum "android/build.gradle" }}-{{ checksum "example/android/build.gradle" }}-{{ checksum "example/android/app/build.gradle" }}
7+
- &save-gradle-cache
8+
paths:
9+
- ~/.gradle
10+
key: gradle-cache-{{ checksum "android/build.gradle" }}-{{ checksum "example/android/build.gradle" }}-{{ checksum "example/android/app/build.gradle" }}
1911

20-
- &type-check
21-
name: TypeScript Checks
22-
command: yarn type-check
12+
# ANALYSE
13+
- &eslint
14+
name: ESLint Checks
15+
command: yarn lint
2316

24-
- &jest
25-
name: Jest Unit Tests
26-
command: yarn test
17+
- &type-check
18+
name: TypeScript Checks
19+
command: yarn type-check
2720

28-
- &flow
29-
name: Flow Type Check
30-
command: yarn flow
21+
- &jest
22+
name: Jest Unit Tests
23+
command: yarn test
3124

25+
- &flow
26+
name: Flow Type Check
27+
command: yarn flow
3228

3329
# -------------------------
3430
# JOBS
@@ -42,90 +38,88 @@ jobs:
4238
linux-checkout:
4339
executor:
4440
name: rn/linux_js
45-
node_version: '10'
41+
node_version: "10"
4642
steps:
47-
- attach_workspace:
48-
at: .
49-
- checkout
50-
- rn/yarn_install
51-
- persist_to_workspace:
52-
root: .
53-
paths: .
43+
- attach_workspace:
44+
at: .
45+
- checkout
46+
- rn/yarn_install
47+
- persist_to_workspace:
48+
root: .
49+
paths: .
5450

5551
eslint:
5652
executor:
5753
name: rn/linux_js
58-
node_version: '10'
54+
node_version: "10"
5955
steps:
60-
- attach_workspace:
61-
at: .
62-
- run: *eslint
56+
- attach_workspace:
57+
at: .
58+
- run: *eslint
6359

6460
type-check:
6561
executor:
6662
name: rn/linux_js
67-
node_version: '10'
63+
node_version: "10"
6864
steps:
69-
- attach_workspace:
70-
at: .
71-
- run: *type-check
72-
65+
- attach_workspace:
66+
at: .
67+
- run: *type-check
68+
7369
jest:
7470
executor:
7571
name: rn/linux_js
76-
node_version: '10'
72+
node_version: "10"
7773
steps:
78-
- attach_workspace:
79-
at: .
80-
- run: *jest
74+
- attach_workspace:
75+
at: .
76+
- run: *jest
8177

8278
flow:
8379
executor:
8480
name: rn/linux_js
85-
node_version: '10'
81+
node_version: "10"
8682
steps:
87-
- attach_workspace:
88-
at: .
89-
- run: *flow
90-
83+
- attach_workspace:
84+
at: .
85+
- run: *flow
86+
9187
android-compile:
9288
executor: rn/linux_android
9389
steps:
94-
- attach_workspace:
95-
at: .
96-
- restore_cache: *restore-gradle-cache
97-
- run:
98-
name: Accept Android licences
99-
command: |-
100-
yes | sdkmanager --licenses || exit 0
101-
yes | sdkmanager --update || exit 0
102-
- run:
103-
name: Build Android Example App and Library
104-
command: |-
105-
cd example
106-
yarn install
107-
cd android
108-
./gradlew clean assembleDebug
109-
- save_cache: *save-gradle-cache
110-
90+
- attach_workspace:
91+
at: .
92+
- restore_cache: *restore-gradle-cache
93+
- run:
94+
name: Accept Android licences
95+
command: |-
96+
yes | sdkmanager --licenses || exit 0
97+
yes | sdkmanager --update || exit 0
98+
- run:
99+
name: Build Android Example App and Library
100+
command: |-
101+
cd example/android
102+
./gradlew clean assembleDebug
103+
- save_cache: *save-gradle-cache
104+
111105
ios-checkout:
112106
executor: rn/macos
113107
steps:
114-
- checkout
115-
- rn/yarn_install
116-
- persist_to_workspace:
117-
root: .
118-
paths: .
108+
- checkout
109+
- rn/yarn_install
110+
- persist_to_workspace:
111+
root: .
112+
paths: .
119113

120114
ios-compile:
121115
executor: rn/macos
122116
steps:
123-
- attach_workspace:
124-
at: .
125-
- run:
126-
name: Build example app
127-
command: |-
128-
react-native run-ios --project-path example/ios
117+
- attach_workspace:
118+
at: .
119+
- run:
120+
name: Build example app
121+
command: |-
122+
react-native run-ios --project-path example/ios
129123
130124
# -------------------------
131125
# WORKFLOWS
@@ -134,23 +128,23 @@ workflows:
134128
version: 2
135129
Test:
136130
jobs:
137-
- linux-checkout
138-
- eslint:
139-
requires:
140-
- linux-checkout
141-
- type-check:
142-
requires:
143-
- linux-checkout
144-
- jest:
145-
requires:
146-
- linux-checkout
147-
- flow:
148-
requires:
149-
- linux-checkout
150-
- android-compile:
151-
requires:
152-
- linux-checkout
153-
# Disabled until we have macOS containers enabled
131+
- linux-checkout
132+
- eslint:
133+
requires:
134+
- linux-checkout
135+
- type-check:
136+
requires:
137+
- linux-checkout
138+
- jest:
139+
requires:
140+
- linux-checkout
141+
- flow:
142+
requires:
143+
- linux-checkout
144+
- android-compile:
145+
requires:
146+
- linux-checkout
147+
# Disabled until we have macOS containers enabled
154148
# - ios-checkout
155149
# - ios-compile:
156150
# requires:

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = { extends: "@react-native-community" };
1+
module.exports = {extends: ['@react-native-community']};

.flowconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ esproposal.nullish_coalescing=enable
3737
module.file_ext=.js
3838
module.file_ext=.json
3939
module.file_ext=.ios.js
40+
module.file_ext=.android.js
4041

4142
munge_underscores=true
4243

File renamed without changes.

README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# @react-native-community/progress-bar-android
32

43
[![Build Status][build-badge]][build]
@@ -16,7 +15,7 @@ Progress Bar Component for Android Devices
1615
```
1716
npm install @react-native-community/progress-bar-android --save
1817
19-
# or
18+
# or
2019
2120
yarn add @react-native-community/progress-bar-android
2221
```
@@ -25,7 +24,7 @@ yarn add @react-native-community/progress-bar-android
2524

2625
- React Native 0.60+
2726

28-
The package is [automatically linked](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) when building the app. All you need to do is:
27+
The package is [automatically linked](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) when building the app. All you need to do is:
2928

3029
```
3130
npx pod-install
@@ -55,42 +54,43 @@ $ react-native link @react-native-community/progress-bar-android
5554
<summary>Manually link the library - android</summary>
5655

5756
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
58-
- Add `import com.reactnativecommunity.androidprogressbar.RNCProgressBarPackage;` to the imports at the top of the file
59-
- Add `new RNCProgressBarPackage()` to the list returned by the `getPackages()` method
57+
58+
- Add `import com.reactnativecommunity.androidprogressbar.RNCProgressBarPackage;` to the imports at the top of the file
59+
- Add `new RNCProgressBarPackage()` to the list returned by the `getPackages()` method
60+
6061
2. Append the following lines to `android/settings.gradle`:
61-
```
62-
include ':@react-native-community_progress-bar-android'
63-
project(':@react-native-community_progress-bar-android').projectDir = new File(rootProject.projectDir, '../../node_modules/@react-native-community/progress-bar-android/android')
64-
```
62+
```
63+
include ':@react-native-community_progress-bar-android'
64+
project(':@react-native-community_progress-bar-android').projectDir = new File(rootProject.projectDir, '../../node_modules/@react-native-community/progress-bar-android/android')
65+
```
6566
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
66-
```
67-
implementation project(':@react-native-community_progress-bar-android')
68-
```
67+
```
68+
implementation project(':@react-native-community_progress-bar-android')
69+
```
6970

7071
</details>
7172

72-
## Trying out this package in `example`
73+
## Trying out this package in `example`
7374

7475
### Android
76+
7577
1. Install dependencies
7678
1. Install dependencies for example folder
7779
1. Start the metro bundler
7880
1. Build the application
7981

8082
```sh
8183
yarn install
82-
cd example
83-
# inside example
84-
yarn install
8584
yarn start
8685
yarn android
8786
```
8887

8988
# Example
89+
9090
```jsx
9191
import React from 'react';
9292
import {View, StyleSheet, Text} from 'react-native';
93-
import { ProgressBar } from '@react-native-community/progress-bar-android';
93+
import {ProgressBar} from '@react-native-community/progress-bar-android';
9494

9595
export default function App() {
9696
return (
@@ -131,7 +131,7 @@ const styles = StyleSheet.create({
131131
});
132132
```
133133

134-
# Reference
134+
# Reference
135135

136136
## Props
137137

@@ -203,12 +203,11 @@ Used to locate this view in end-to-end tests.
203203
| ------ | -------- |
204204
| string | No |
205205

206-
207206
[build-badge]: https://img.shields.io/circleci/project/github/react-native-community/progress-bar-android/master.svg?style=flat-square
208207
[build]: https://circleci.com/gh/react-native-community/progress-bar-android
209208
[version-badge]: https://img.shields.io/npm/v/@react-native-community/progress-bar-android.svg?style=flat-square
210209
[package]: https://www.npmjs.com/package/@react-native-community/progress-bar-android
211-
[support-badge]:https://img.shields.io/badge/platforms-android-lightgrey.svg?style=flat-square
210+
[support-badge]: https://img.shields.io/badge/platforms-android-lightgrey.svg?style=flat-square
212211
[license-badge]: https://img.shields.io/npm/l/@react-native-community/progress-bar-android.svg?style=flat-square
213212
[license]: https://opensource.org/licenses/MIT
214213
[lean-core-badge]: https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg?style=flat-square

android/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ repositories {
3232
dependencies {
3333
implementation 'com.facebook.react:react-native:+'
3434
}
35-

0 commit comments

Comments
 (0)