You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* TCS-1286 docs: update contributing doc to reflect use of npm instead of yarn
* TCS-1286 build: switch example app to use npm
* TCS-1286 build: add xcode env to gitignore
* TCS-1286 build: upgrade RN from 0.72 to 0.73
* TCS-1286 build: use new rn babel package
* TCS-1286 build: lock RN to 0.73.1
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17-21
Original file line number
Diff line number
Diff line change
@@ -4,51 +4,47 @@ We want this community to be friendly and respectful to each other. Please follo
4
4
5
5
## Development workflow
6
6
7
-
To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
7
+
To get started with the project, run `npm install` in the root directory to install the required dependencies for each package:
8
8
9
9
```sh
10
-
yarn
10
+
npm install
11
11
```
12
12
13
-
> 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.
14
-
15
-
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.
16
-
17
13
To start the packager:
18
14
19
15
```sh
20
-
yarn example start
16
+
npm run example:start
21
17
```
22
18
23
19
To run the example app on Android:
24
20
25
21
```sh
26
-
yarn example android
22
+
npm run example:android
27
23
```
28
24
29
25
To run the example app on iOS:
30
26
31
27
```sh
32
-
yarn example ios
28
+
npm run example:ios
33
29
```
34
30
35
31
Make sure your code passes TypeScript and ESLint. Run the following to verify:
36
32
37
33
```sh
38
-
yarn typescript
39
-
yarn lint
34
+
npm run typescript
35
+
npm run lint
40
36
```
41
37
42
38
To fix formatting errors, run the following:
43
39
44
40
```sh
45
-
yarn lint --fix
41
+
npm run lint --fix
46
42
```
47
43
48
44
Remember to add tests for your change if possible. Run the unit tests by:
49
45
50
46
```sh
51
-
yarntest
47
+
npm runtest
52
48
```
53
49
54
50
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`.
@@ -83,20 +79,20 @@ We use [release-it](https://github.com/release-it/release-it) to make it easier
83
79
To publish new versions, run the following:
84
80
85
81
```sh
86
-
yarn release
82
+
npm run release
87
83
```
88
84
89
85
### Scripts
90
86
91
87
The `package.json` file contains various scripts for common tasks:
92
88
93
-
-`yarn bootstrap`: setup project by installing all dependencies and pods.
94
-
-`yarn typescript`: type-check files with TypeScript.
95
-
-`yarn lint`: lint files with ESLint.
96
-
-`yarn test`: run unit tests with Jest.
97
-
-`yarn example start`: start the Metro server for the example app.
98
-
-`yarn example android`: run the example app on Android.
99
-
-`yarn example ios`: run the example app on iOS.
89
+
-`npm run bootstrap`: setup project by installing all dependencies and pods.
90
+
-`npm run typescript`: type-check files with TypeScript.
91
+
-`npm run lint`: lint files with ESLint.
92
+
-`npm run test`: run unit tests with Jest.
93
+
-`npm run example:start`: start the Metro server for the example app.
94
+
-`npm run example:android`: run the example app on Android.
95
+
-`npm run example:ios`: run the example app on iOS.
0 commit comments