Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Expo config plugin #317

Merged

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Apr 26, 2021

Why

With Expo SDK 41 we've rolled out an interface called config plugins which lets users add native modules that aren't in the Expo Go app to their native cloud builds and locally when prebuilding.

This is a highly requested package so I've created the plugin personally.

We’re still working on improving the development experience for config plugins and custom managed workflow, feel free to add any feedback. People won’t be able to use this in an Expo-Go-like-app until we release “Expo Development Client” (more info).

How

  • Added a /plugin folder and an app.plugin.js as the main entry point to the plugin. Plugins must run in at node LTS environments (currently that means 12 and greater), so a custom tsconfig.json is used for transpilation.
  • The plugin is like a different package that's vendored for versioning purposes. Building is done with tsc --build plugin (yarn build:plugin).

Test Plan

  • Run npm pack in the package
  • Install the package in a managed Expo project yarn add @react-native-voice/voice@../voice/react-native-voice-3.1.5.tgz
  • Then add @react-native-voice/voice to the plugins array and build the native app locally with expo prebuild and yarn ios, yarn android. We plan to further automate these steps with expo install and expo run commands.

Modified some values and in the config plugin and updated with expo prebuild and yarn ios, yarn android.

README.md Outdated Show resolved Hide resolved
@EvanBacon EvanBacon marked this pull request as ready for review May 26, 2021 20:32
@safaiyeh safaiyeh merged commit 057e06d into react-native-voice:master Jun 2, 2021
safaiyeh pushed a commit that referenced this pull request Jun 2, 2021
# [3.2.0](v3.1.5...v3.2.0) (2021-06-02)

### Features

* **Expo:** Added Expo config plugin ([#317](#317)) ([057e06d](057e06d))
@safaiyeh
Copy link
Member

safaiyeh commented Jun 2, 2021

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@EvanBacon EvanBacon deleted the @evanbacon/add-config-plugin branch June 2, 2021 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants