Skip to content

Commit ba95bfc

Browse files
author
Kishor Jena
committed
docs
1 parent 2d7c744 commit ba95bfc

File tree

3 files changed

+7
-286
lines changed

3 files changed

+7
-286
lines changed

CODE_OF_CONDUCT.md

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

CONTRIBUTING.md

Lines changed: 1 addition & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -2,150 +2,4 @@
22

33
Contributions are always welcome, no matter how large or small!
44

5-
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. Before contributing, please read the [code of conduct](./CODE_OF_CONDUCT.md).
6-
7-
## Development workflow
8-
9-
This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/features/workspaces). It contains the following packages:
10-
11-
- The library package in the root directory.
12-
- An example app in the `example/` directory.
13-
14-
To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
15-
16-
```sh
17-
yarn
18-
```
19-
20-
> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development.
21-
22-
The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.
23-
24-
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
25-
26-
If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/ImageFileTransformerExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-image-file-transformer`.
27-
28-
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-image-file-transformer` under `Android`.
29-
30-
You can use various commands from the root directory to work with the project.
31-
32-
To start the packager:
33-
34-
```sh
35-
yarn example start
36-
```
37-
38-
To run the example app on Android:
39-
40-
```sh
41-
yarn example android
42-
```
43-
44-
To run the example app on iOS:
45-
46-
```sh
47-
yarn example ios
48-
```
49-
50-
By default, the example is configured to build with the old architecture. To run the example with the new architecture, you can do the following:
51-
52-
1. For Android, run:
53-
54-
```sh
55-
ORG_GRADLE_PROJECT_newArchEnabled=true yarn example android
56-
```
57-
58-
2. For iOS, run:
59-
60-
```sh
61-
RCT_NEW_ARCH_ENABLED=1 yarn pod-install example/ios
62-
yarn example ios
63-
```
64-
65-
If you are building for a different architecture than your previous build, make sure to remove the build folders first. You can run the following command to cleanup all build folders:
66-
67-
```sh
68-
yarn clean
69-
```
70-
71-
To confirm that the app is running with the new architecture, you can check the Metro logs for a message like this:
72-
73-
```sh
74-
Running "ImageFileTransformerExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
75-
```
76-
77-
Note the `"fabric":true` and `"concurrentRoot":true` properties.
78-
79-
Make sure your code passes TypeScript and ESLint. Run the following to verify:
80-
81-
```sh
82-
yarn typecheck
83-
yarn lint
84-
```
85-
86-
To fix formatting errors, run the following:
87-
88-
```sh
89-
yarn lint --fix
90-
```
91-
92-
Remember to add tests for your change if possible. Run the unit tests by:
93-
94-
```sh
95-
yarn test
96-
```
97-
98-
### Commit message convention
99-
100-
We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
101-
102-
- `fix`: bug fixes, e.g. fix crash due to deprecated method.
103-
- `feat`: new features, e.g. add new method to the module.
104-
- `refactor`: code refactor, e.g. migrate from class components to hooks.
105-
- `docs`: changes into documentation, e.g. add usage example for the module..
106-
- `test`: adding or updating tests, e.g. add integration tests using detox.
107-
- `chore`: tooling changes, e.g. change CI config.
108-
109-
Our pre-commit hooks verify that your commit message matches this format when committing.
110-
111-
### Linting and tests
112-
113-
[ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/)
114-
115-
We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.
116-
117-
Our pre-commit hooks verify that the linter and tests pass when committing.
118-
119-
### Publishing to npm
120-
121-
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.
122-
123-
To publish new versions, run the following:
124-
125-
```sh
126-
yarn release
127-
```
128-
129-
### Scripts
130-
131-
The `package.json` file contains various scripts for common tasks:
132-
133-
- `yarn`: setup project by installing dependencies.
134-
- `yarn typecheck`: type-check files with TypeScript.
135-
- `yarn lint`: lint files with ESLint.
136-
- `yarn test`: run unit tests with Jest.
137-
- `yarn example start`: start the Metro server for the example app.
138-
- `yarn example android`: run the example app on Android.
139-
- `yarn example ios`: run the example app on iOS.
140-
141-
### Sending a pull request
142-
143-
> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
144-
145-
When you're sending a pull request:
146-
147-
- Prefer small pull requests focused on one change.
148-
- Verify that linters and tests are passing.
149-
- Review the documentation to make sure it looks good.
150-
- Follow the pull request template when opening a pull request.
151-
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
5+
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
Platform support:
88

9-
[x] Android
10-
[ ] ios
9+
- [x] Android
10+
- [ ] ios
1111

1212
## Installation
1313

@@ -70,12 +70,12 @@ Transform.animated(uris, {
7070
.catch(e=>{log('error ',e)})
7171
```
7272

73-
Contributing
74-
If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the project's GitHub repository.
73+
## Contribution
74+
If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the project's GitHub repository. [CONTRIBUTING.md](CONTRIBUTING.md)
7575

76-
You can follow/contact me on
76+
### Contact on:
7777
X (twitter) : x.com/heyKSR
7878

7979
## License
8080

81-
MIT
81+
[LICENSE](LICENSE)

0 commit comments

Comments
 (0)