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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+39-20Lines changed: 39 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,8 @@ If you wish to submit a pull request for a new feature or issue, you should star
18
18
19
19
This project is a monorepo managed using [pnpm workspaces](https://pnpm.io/workspaces). It contains the following packages:
20
20
21
-
- The library package in `packages/common`
22
-
-An example app in `packages/icon-explorer
21
+
- The library packages in `packages/common` and `packages/get-image`
22
+
-Example apps in `packages/icon-explorer` and `packages/directory`
23
23
- Fonts in `packages/fontname` e.g. `packages/fontawesome6`
24
24
25
25
To get started with the project, run `pnpm install` in the root directory to install the required dependencies for each package:
@@ -87,17 +87,16 @@ Running "IconExplorer" with {"fabric":true,"initialProps":{"concurrentRoot":true
87
87
88
88
Note the `"fabric":true` and `"concurrentRoot":true` properties.
89
89
90
-
Make sure your code passes TypeScript and ESLint. Run the following to verify:
90
+
Make sure your code passes all of our linting. Run the following to verify:
91
91
92
92
```sh
93
-
pnpm run typecheck
94
93
pnpm run lint
95
94
```
96
95
97
96
To fix formatting errors, run the following:
98
97
99
98
```sh
100
-
pnpm run lint --fix
99
+
pnpm run lint:biome --fix
101
100
```
102
101
103
102
Remember to add tests for your change if possible. Run the unit tests by:
@@ -106,11 +105,11 @@ Remember to add tests for your change if possible. Run the unit tests by:
106
105
pnpm run test
107
106
```
108
107
109
-
### Detox
108
+
### Tests
110
109
111
-
TODO: Expand on detox here
110
+
We run tests again `new` and `old` architecture against the last 3 versions of React Native automatically via CI.
112
111
113
-
To run the detox tests you should create an avd called test which is based on the Pixel 6 Pro profile. This is essential for the screenshot diffs to work
112
+
To run the these tests manually you should create an avd called test which is based on the Pixel 6 Pro profile. This is essential for the screenshot diffs to work
You can switch versions of react native before running the tests with
130
+
131
+
```
132
+
cd packages/icon-explorer
133
+
# ./set-rn-version <arch> <version>
134
+
./set-rn-version new 0.74
135
+
./set-rn-version old 0.79
136
+
```
137
+
130
138
### Commit message convention
131
139
132
140
We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
@@ -150,25 +158,18 @@ Our pre-commit hooks verify that the linter and tests pass when committing.
150
158
151
159
### Publishing to npm
152
160
153
-
We use [release-it](https://github.com/release-it/release-it) to make it easier to publish new versions. It handles common tasks like bumping version based on semver, creating tags and releases etc.
161
+
We use `nx` to make it easier to publish new versions. It handles common tasks like bumping version based on semver, creating tags and releases etc.
154
162
155
-
To publish new versions, run the following:
156
-
157
-
```sh
158
-
pnpm run release
159
-
```
163
+
To publish new versions, use the github action [release.yml](.github/workflows/deploy.yml) which is triggered manually.
160
164
161
165
### Scripts
162
166
163
167
The `package.json` file contains various scripts for common tasks:
164
168
165
169
-`pnpm i`: setup project by installing dependencies.
166
-
-`pnpm run typecheck`: type-check files with TypeScript.
167
-
-`pnpm run lint`: lint files with ESLint.
168
-
-`pnpm run test`: run unit tests with Jest.
169
-
-`pnpm run example start`: start the Metro server for the example app.
170
-
-`pnpm run example android`: run the example app on Android.
171
-
-`pnpm run example ios`: run the example app on iOS.
170
+
-`pnpm run lint:typecheck`: type-check files with TypeScript.
171
+
-`pnpm run lint:eslint`: lint files with ESLint.
172
+
-`pnpm run lint:biome`: lint files with Biome.
172
173
173
174
### Sending a pull request
174
175
@@ -181,3 +182,21 @@ When you're sending a pull request:
181
182
- Review the documentation to make sure it looks good.
182
183
- Follow the pull request template when opening a pull request.
183
184
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
185
+
186
+
### Font generation
187
+
188
+
All the fonts are automatiaclly generated using a `yeoman` generator. This is driven by a `.yo-rc.json` file in the root of each font.
189
+
190
+
To make changes to common font files you shuold edit the files in `packages/generator-react-native-vector-icons/src/app/templates/` and then at the root you shuld run:
191
+
192
+
```sh
193
+
# Generate all fonts
194
+
pnpm generate
195
+
196
+
# Generate a single font
197
+
pnpm generate ant-design
198
+
```
199
+
200
+
### Font versioning
201
+
202
+
Font package versions are now independent of upstream font versions and we track the mapping in the README.md of each font
0 commit comments