Skip to content

Commit

Permalink
docs: use docusaurus for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Murat committed Mar 18, 2024
1 parent 5fd921a commit fca731b
Show file tree
Hide file tree
Showing 68 changed files with 17,042 additions and 1,605 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
docs
lib/__tests__
website
100 changes: 7 additions & 93 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,104 +10,18 @@

**Single-command integration of React Native packages**

## Introduction

This is a command-line tool designed to streamline the process of integrating additional code into React Native projects. It automates the integration steps that are often required when adding packages that involve modifications to iOS or Android projects.

You can focus more on coding and development, while the tool takes care of integrating the necessary code changes into your project. It is particularly helpful for reducing manual labor and potential errors when working with various React Native packages.

## Features

- Automatic integration of additional code into React Native iOS and Android projects.
- Simplifies the process of handling code changes required by various packages.
- Makes it possible to upgrade to new RN versions with a single command.
- Saves time and effort by automating integration tasks.

## Usage

There are two options to use this CLI, manual and automatic.

### 1. Manual
In manual usage you run the cli after each time you install a package.
```bash
npx react-native-integrate <package-name>
```

#### Example
```bash
# First install the package
npm install @react-native-firebase/app

# Then integrate it
npx react-native-integrate @react-native-firebase/app
```

### 2. Automatic
- Install this package as a dev dependency

```bash
npm install react-native-integrate --save-dev
# or
yarn add react-native-integrate --dev
```

- Add the "integrate" command as a post-install script in your project's package.json:

```json
"scripts": {
"postinstall": "integrate"
}
```

After each package installation, the "integrate" command will automatically be triggered, and the necessary code changes will be integrated into your React Native project.

It gets your approval before each integration so no need to worry about messing up your code.

> **_NOTE:_** If you are using npm, since 7.0.0 postinstall script does not run after `npm install <some-package>`
>
> In this case you can run `integrate` manually after a package installation.
## Getting Integration Information

To check the availability of integration for a specific package and view related information, you can use the following command:

```bash
npx react-native-integrate info <package-name>
# or, if you've installed it as a dev dependency
integrate info <package-name>
```

This command allows you to verify the integration status, including the availability of local or remote configuration files.

## Upgrading React Native

This tool keeps track of integrations in `integrate-lock.json`. Also input values and files that are required by integrations will be saved in `.upgrade` folder.

When upgrading to a new RN version;
1. Create a new React Native project
2. Move `package.json` dependencies, `integrate-lock.json` and `.upgrade` folder to the new project
3. Run `npm install` to install node modules.
4. Run:
```bash
npx react-native-integrate upgrade
# or, if you've installed it as a dev dependency
upgrade
```
Your old project data will be imported and all previously integrated packages will be re-integrated into your new RN project.

## For Package Developers

If your package requires "additional steps" after installation, follow these steps to allow other developers quickly integrate your package into their projects.

1. Create an `integrate.yml` file in the root directory of your project.
2. Add the necessary tasks for integrating your package into this file. Check **[Configuration](docs/CONFIGURATION.md)** page for detailed instructions.
3. Encourage developers to run `npx react-native-integrate <your-package>` right after installation of your package.
- Automatic package integration which require native code changes.
- Real upgrade helper by automatic import of old project data and re-integration.
- Supports android and ios
- Fully tested

### Get help from community
## Getting Started

You can also open an issue and provide a link to a repository that features a clean React Native installation with your package integrated.
Check the [documentation](https://react-native-integrate.github.io/integrate/docs/get-started) to get started.

## Contributing
## Contribution

Contributions are welcome! If you find any issues, have suggestions feel free to submit a pull request or open an issue. For major changes, please discuss the proposed changes with us first.

Expand Down
120 changes: 0 additions & 120 deletions docs/ANDROID_MANIFEST.md

This file was deleted.

123 changes: 0 additions & 123 deletions docs/APP_DELEGATE.md

This file was deleted.

Loading

0 comments on commit fca731b

Please sign in to comment.