https://github.com/malaa-tech/expo-custom-assets
Expo plugin to add custom assets to native codebase
https://github.com/malaa-tech/expo-custom-assets
Last synced: about 2 months ago
JSON representation
Expo plugin to add custom assets to native codebase
- Host: GitHub
- URL: https://github.com/malaa-tech/expo-custom-assets
- Owner: Malaa-tech
- License: mit
- Created: 2024-01-24T20:20:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-19T07:11:05.000Z (5 months ago)
- Last Synced: 2025-03-29T04:03:52.811Z (2 months ago)
- Language: JavaScript
- Size: 1.27 MB
- Stars: 54
- Watchers: 4
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# expo-custom-assets
Expo plugin to add custom assets to xcode and android studio to allow the usage of it as local files for projects like [Rive](https://help.rive.app/runtimes/overview/react-native/adding-rive-to-expo)
# Demo
# API documentation
- This plugin requires assets path only nothing more
### Add the package to your npm dependencies
```
npm install expo-custom-assets
yarn add expo-custom-assets
pnpm install expo-custom-assets
bun install expo-custom-assets
```# Installation in managed Expo projects
For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects
- After installing the package through npm add the plugin to your app.json
```json
"plugins": [
[
"expo-custom-assets",
{
// Add asset directory paths, the plugin copies the files in the given paths to the app bundle folder named Assets
"assetsPaths": ["./path-to-your-asset-folder"]
// if you want custom assets directory name use this prop (default: "Assets")
// "assetsDirName": "testName"
}
]
]
```# Installation in bare React Native projects
For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
# Contributing
Contributions are very welcome! we have some things to do in our [Todo's](#Todo's)
# Todo's
- [x] Stop creating Assets folder in it exist
- [x] Allow for custom asset folder name
- [x] Fix typescript error when building the package
- [ ] Add more example for other custom assets other than Rive# Credits
- For the android part I almost used the plugin from [MortadhaFadhlaoui](https://github.com/MortadhaFadhlaoui) at with small modifications
- For ios part I really benefited from
- ChatGpt for the great help with making the script work as I wanted