Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCS-1286 RN 0.73 Upgrade #75

Merged
merged 6 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
example/ios/.xcode.env.local

# Android/IJ
#
Expand Down
38 changes: 17 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,47 @@ We want this community to be friendly and respectful to each other. Please follo

## Development workflow

To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
To get started with the project, run `npm install` in the root directory to install the required dependencies for each package:

```sh
yarn
npm install
```

> While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.

While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.

To start the packager:

```sh
yarn example start
npm run example:start
```

To run the example app on Android:

```sh
yarn example android
npm run example:android
```

To run the example app on iOS:

```sh
yarn example ios
npm run example:ios
```

Make sure your code passes TypeScript and ESLint. Run the following to verify:

```sh
yarn typescript
yarn lint
npm run typescript
npm run lint
```

To fix formatting errors, run the following:

```sh
yarn lint --fix
npm run lint --fix
```

Remember to add tests for your change if possible. Run the unit tests by:

```sh
yarn test
npm run test
```

To edit the Objective-C files, open `example/ios/IdscanSdkExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-idscan-sdk`.
Expand Down Expand Up @@ -83,20 +79,20 @@ We use [release-it](https://github.com/release-it/release-it) to make it easier
To publish new versions, run the following:

```sh
yarn release
npm run release
```

### Scripts

The `package.json` file contains various scripts for common tasks:

- `yarn bootstrap`: setup project by installing all dependencies and pods.
- `yarn typescript`: type-check files with TypeScript.
- `yarn lint`: lint files with ESLint.
- `yarn test`: run unit tests with Jest.
- `yarn example start`: start the Metro server for the example app.
- `yarn example android`: run the example app on Android.
- `yarn example ios`: run the example app on iOS.
- `npm run bootstrap`: setup project by installing all dependencies and pods.
- `npm run typescript`: type-check files with TypeScript.
- `npm run lint`: lint files with ESLint.
- `npm run test`: run unit tests with Jest.
- `npm run example:start`: start the Metro server for the example app.
- `npm run example:android`: run the example app on Android.
- `npm run example:ios`: run the example app on iOS.

### Sending a pull request

Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
Loading