Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 1.88 KB

local-development-readme.md

File metadata and controls

68 lines (43 loc) · 1.88 KB

Local development

System requirements

Build the plugin

You only need to install npm packages and the plugin will be built automatically.

Run the following command at the root directory of this repository:

npm install

Build and run the test app

You can use the test app included in this repository to run the plugin and test its functionality. You can also use this app to quickly test changes made locally to the plugin.

Run the following commands in the test-app directory:

npm install
npx expo prebuild

You can then use the following commands to run the test app on Android or iOS:

npx expo run:android
npx expo run:ios

Plugin Dependency Installation

Note: For Node.js 18 or newer, this typically runs automatically with npm install.

We use tarball dependency to ensure our expo plugin is installed as if it was published, avoiding path issues and ensuring dependencies are resolved consistently. If you face errors, run following command before running npm install:

npm run preinstall

Convenience scripts

Sometimes when you are making changes to the plugin, it's helpful to clear out dependencies or rebuild the plugin. There are a couple of convenience scripts that you can use.

Make sure to run any of these scripts at the root directory of this repository.

To delete node_module directories and the generated test app native Android and iOS projects generated by Expo, run the following command:

npm run cleanAll

To build and install packages for the plugin and generate native Android and iOS projects for the test app:

npm run buildAll

A shorthand to clean up everything and rebuild, run the following command:

npm run cleanAndBuildAll