Skip to content

Commit 7292f9a

Browse files
michalchudziakMariia Marchenkovamarchenk0vabmigirlEsemesek
authored
Private repo migration (#53)
* New project structure * Add framework encapsulation * fix lock file * initial cli work * Move bundler to separate package, create bundler example * restructure * chore: removed flow and set up typescript * TypeScript set up (#29) * chore: updated babel config * chore: set up typescript in examples * chore: update cli to typescript * feat: added cli-types and build scripts * fix: lint errors * chore: updated ci config * Finish TS impl Co-authored-by: Michał Chudziak <michal.chudziak@gmail.com> * Fix lockfiles and remove cli-types * Finish dev setup * Add usage of npm instead of yarn as an option to the bundle-ios command * Add index.js in cli package to avoid yarn failling on install * Add build android. Add helpers file and refactor (#32) * feat: copy files on build-ios command (#30) * feat: copy files on build-ios command * change invocation order Co-authored-by: Michał Chudziak <michal.chudziak@gmail.com> * feat: copy adroid from cli (#33) * Make ios build work (#34) * Update ios podfile paths and build ios command * Update paths to node modules in cli xcode project * Update ios build * Update ios build * refactor * refactor * Improve cli (#35) * wip * Add output file option for building ios * Add default copy path * Fix copied framework folder name * feat: copy files on build-ios command * change invocation order * Added build-android command * Updated gradle files, build output dir for andoid * Deleted output dir in example * fix * fix path for js bundle * fix android JS bundle path * Tweak java guide fragments import * Tweak Kotlin fragment import docs * Tweak wrong link package in Objective C docs * Tweak invalid link package in Swift docs * Update deps, fix TS * Fix lint issues Co-authored-by: Mariia Marchenkova <marchewka@iPhoneJkLankauf.localdomain> Co-authored-by: marchenk0va <35371977+marchenk0va@users.noreply.github.com> Co-authored-by: Magdalena Markusik <magdalena@markusik.com> Co-authored-by: Kacper Wiszczuk <kacperwiszczuk@gmail.com> Co-authored-by: Mateusz Wit <maateew@gmail.com> Co-authored-by: Drapich Piotr <drapich.piotr@gmail.com>
1 parent b39e8a0 commit 7292f9a

File tree

202 files changed

+11977
-3320
lines changed

Some content is hidden

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

202 files changed

+11977
-3320
lines changed

.circleci/config.yml

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,52 @@
11
version: 2.1
22

3+
defaults: &defaults
4+
docker:
5+
- image: circleci/node:10
6+
working_directory: ~/react-native-brownfield
7+
38
jobs:
4-
analyse:
5-
docker:
6-
- image: circleci/node:10
9+
install-dependencies:
10+
<<: *defaults
711
steps:
812
- checkout
13+
- attach_workspace:
14+
at: ~/react-native-brownfield
915
- restore_cache:
1016
keys:
1117
- v1-dependencies-{{ checksum "package.json" }}
1218
- v1-dependencies-
13-
- run: yarn install
19+
- run: rm yarn.lock && yarn install
1420
- save_cache:
21+
key: v1-dependencies-{{ checksum "package.json" }}
1522
paths:
1623
- node_modules
17-
key: v1-dependencies-{{ checksum "package.json" }}
18-
- run:
19-
name: Lint JS Code (ESLint)
20-
command: yarn run lint
21-
- run:
22-
name: Flow
23-
command: yarn run flow
24+
- persist_to_workspace:
25+
root: .
26+
paths:
27+
- .
28+
lint:
29+
<<: *defaults
30+
steps:
31+
- attach_workspace:
32+
at: ~/react-native-brownfield
33+
- run: yarn lint
34+
typescript:
35+
<<: *defaults
36+
steps:
37+
- attach_workspace:
38+
at: ~/react-native-brownfield
39+
- run: yarn typescript
40+
2441

2542
workflows:
26-
test:
43+
version: 2.1
44+
build-and-test:
2745
jobs:
28-
- analyse
46+
- install-dependencies
47+
- lint:
48+
requires:
49+
- install-dependencies
50+
- typescript:
51+
requires:
52+
- install-dependencies

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
build/

.eslintrc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
extends: '@react-native-community',
33
env: {
4-
es6: true
5-
}
6-
}
4+
es6: true,
5+
},
6+
};

.flowconfig

Lines changed: 0 additions & 100 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ buck-out/
5757

5858
# CocoaPods
5959
**/Pods
60+
61+
*.tsbuildinfo

babel.config.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
module.exports = {
22
presets: ['module:metro-react-native-babel-preset'],
3-
plugins: [
4-
[
5-
'module-resolver',
6-
{
7-
alias: {
8-
'@callstack/react-native-brownfield': './src',
9-
},
10-
},
11-
],
12-
],
133
};

docs/JAVA.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Examples:
251251
An fragment rendering `ReactRootView` with a given module name. It automatically uses an instance of a bridge created in `startReactNative` method. It works well with exposed JavaScript module. All the lifecycles are proxied to `ReactInstanceManager`. It's the simplest way to embed React Native into your navigation stack.
252252

253253
```java
254-
import com.callstack.reactnativebrownfield.ReactNativeActivity;
254+
import com.callstack.reactnativebrownfield.ReactNativeFragment;
255255
```
256256

257257
---
@@ -272,28 +272,28 @@ Params:
272272
Examples:
273273

274274
```java
275-
ReactNativeActivity.createReactNativeFragment("ReactNative");
275+
ReactNativeFragment.createReactNativeFragment("ReactNative");
276276
```
277277

278278
```java
279279
Bundle bundle = new Bundle();
280280
bundle.putInt("score", 12);
281281

282-
ReactNativeActivity.createReactNativeFragment("ReactNative", bundle);
282+
ReactNativeFragment.createReactNativeFragment("ReactNative", bundle);
283283
```
284284

285285
```java
286286
HashMap map = new HashMap<String, *>();
287287
map.put("score", 12);
288288

289-
ReactNativeActivity.createReactNativeFragment("ReactNative", map);
289+
ReactNativeFragment.createReactNativeFragment("ReactNative", map);
290290
```
291291

292292
```java
293293
WritableMap map = new WritableMap();
294294
map.putInt("score", 12);
295295

296-
ReactNativeActivity.createReactActivityIntent(context, "ReactNative", map);
296+
ReactNativeFragment.createReactActivityIntent(context, "ReactNative", map);
297297
```
298298

299299
---

docs/KOTLIN.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Examples:
221221
An fragment rendering `ReactRootView` with a given module name. It automatically uses an instance of a bridge created in `startReactNative` method. It works well with exposed JavaScript module. All the lifecycles are proxied to `ReactInstanceManager`. It's the simplest way to embed React Native into your navigation stack.
222222

223223
```kotlin
224-
import com.callstack.reactnativebrownfield.ReactNativeActivity
224+
import com.callstack.reactnativebrownfield.ReactNativeFragment
225225
```
226226

227227
---
@@ -242,27 +242,27 @@ Params:
242242
Examples:
243243

244244
```kotlin
245-
ReactNativeActivity.createReactNativeFragment("ReactNative")
245+
ReactNativeFragment.createReactNativeFragment("ReactNative")
246246
```
247247

248248
```kotlin
249249
val bundle = new Bundle()
250250
bundle.putInt("score", 12)
251251

252-
ReactNativeActivity.createReactNativeFragment("ReactNative", bundle)
252+
ReactNativeFragment.createReactNativeFragment("ReactNative", bundle)
253253
```
254254

255255
```kotlin
256256
val map = hashMapOf<String, *>("score" to 12)
257257

258-
ReactNativeActivity.createReactNativeFragment("ReactNative", map)
258+
ReactNativeFragment.createReactNativeFragment("ReactNative", map)
259259
```
260260

261261
```kotlin
262262
val map = WritableMap()
263263
map.putInt("score", 12)
264264

265-
ReactNativeActivity.createReactActivityIntent(context, "ReactNative", map)
265+
ReactNativeFragment.createReactActivityIntent(context, "ReactNative", map)
266266
```
267267

268268
---

docs/OBJECTIVE_C.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The library is meant to work with [auto linking](https://github.com/react-native
1111
Run the following command in your terminal:
1212

1313
```bash
14-
react-native link @react-native-community/slider
14+
react-native link @callstack/react-native-brownfield
1515
```
1616
</details>
1717

docs/SWIFT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The library is meant to work with [auto linking](https://github.com/react-native
2525
Run the following command in your terminal:
2626

2727
```bash
28-
react-native link @react-native-community/slider
28+
react-native link @callstack/react-native-brownfield
2929
```
3030
</details>
3131

0 commit comments

Comments
 (0)