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

refactor: fix plugin export #9

Merged
merged 3 commits into from
Apr 25, 2023
Merged

refactor: fix plugin export #9

merged 3 commits into from
Apr 25, 2023

Conversation

SihamBen
Copy link
Collaborator

@SihamBen SihamBen commented Apr 17, 2023

This PR aims to fix the problem with having to export Plugin from app-icon-badge/dist/js.
Reaching inside a package is considered bad form based on expo docs.
We need to be able to import our plugin from root folder, or the alternative is having app.plugin.js file in root.
Fix was to rename plugin file to app.plugin.ts and copy file to root on build

@SihamBen SihamBen requested a review from yjose April 17, 2023 20:15
Copy link
Member

@yjose yjose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, @SihamBen 🙌! Just a few enhancements to clean up the implementation:

  • Add app.plugin.js to .gitignore
  • Clean up dependencies by removing unused deps, as well as scripts
  • Add prettier format script "format": "prettier --write \"**/*.{ts,md,json}\" --ignore-path .gitignore",
  • For the build script, you need to copy the typing to the root file too if you need it. If not, then no need to generate it; in this case, remove the --dts flag while building app.plugin.js

@SihamBen SihamBen merged commit 940b232 into master Apr 25, 2023
@SihamBen SihamBen deleted the fix/plugin-export branch June 17, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants