|
1 |
| -# React Native New Architecture Library Samples |
2 |
| -This repo contains several branches that will help you understand how to setup your libraries for the React Native New Architecture. This should considered as a support material of the official migration guide. |
| 1 | +## Table of contents |
3 | 2 |
|
4 |
| -Here you will find runs of the migration guide on empty projects. Every commit is documented and allows to follow over on every step. |
| 3 | +* [[Setup] Create the calculator folder and the package.json](#setup) |
5 | 4 |
|
6 |
| -Please find a list of the branches below, with more information on which kind of setup they're addressing. |
| 5 | +## Steps |
7 | 6 |
|
8 |
| -## Branches |
| 7 | +### <a name="setup" />[[Setup] Create the calculator folder and the package.json](https://github.com/cipolleschi/RNNewArchitectureLibraries/commit/) |
9 | 8 |
|
10 |
| -| Branch Name | Description | Android | iOS | |
11 |
| -| ----------- | ----------- | ------- | --- | |
12 |
| -| [`feat/back-turbomodule`](https://github.com/cipolleschi/RNNewArchitectureLibraries/tree/feat/back-turbomodule) | This branch contains the step-by-step process to create a simple TurboModule which can be used in both the old and the new architecture | ✅ | ✅ | |
13 |
| -| [`feat/back-fabric-comp`](https://github.com/cipolleschi/RNNewArchitectureLibraries/tree/feat/back-fabric-comp) | This branch contains the step-by-step process to create a simple Fabric Component which can be used in both the old and the new architecture | ✅ | ✅ | |
| 9 | +1. `mkdir calculator` |
| 10 | +1. `touch calculator/package.json` |
| 11 | +1. Paste the following code into the `package.json` file |
| 12 | +```json |
| 13 | +{ |
| 14 | + "name": "calculator", |
| 15 | + "version": "0.0.1", |
| 16 | + "description": "Showcase Turbomodule with backward compatibility", |
| 17 | + "react-native": "src/index", |
| 18 | + "source": "src/index", |
| 19 | + "files": [ |
| 20 | + "src", |
| 21 | + "android", |
| 22 | + "ios", |
| 23 | + "calculator.podspec", |
| 24 | + "!android/build", |
| 25 | + "!ios/build", |
| 26 | + "!**/__tests__", |
| 27 | + "!**/__fixtures__", |
| 28 | + "!**/__mocks__" |
| 29 | + ], |
| 30 | + "keywords": ["react-native", "ios", "android"], |
| 31 | + "repository": "https://github.com/<your_github_handle>/calculator", |
| 32 | + "author": "<Your Name> <your_email@your_provider.com> (https://github.com/<your_github_handle>)", |
| 33 | + "license": "MIT", |
| 34 | + "bugs": { |
| 35 | + "url": "https://github.com/<your_github_handle>/calculator/issues" |
| 36 | + }, |
| 37 | + "homepage": "https://github.com/<your_github_handle>/calculator#readme", |
| 38 | + "devDependencies": {}, |
| 39 | + "peerDependencies": { |
| 40 | + "react": "*", |
| 41 | + "react-native": "*" |
| 42 | + } |
| 43 | +} |
| 44 | +``` |
0 commit comments