{"id":15657596,"url":"https://github.com/bycedric/custom-prebuild-example","last_synced_at":"2025-05-05T15:52:15.981Z","repository":{"id":156259886,"uuid":"630617509","full_name":"byCedric/custom-prebuild-example","owner":"byCedric","description":"Demonstration of out-of-tree platforms for Expo Prebuild and Config Plugins","archived":false,"fork":false,"pushed_at":"2023-04-26T12:38:24.000Z","size":3928,"stargazers_count":38,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T22:11:13.909Z","etag":null,"topics":["config-plugins","expo","react-native"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/byCedric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-20T19:12:15.000Z","updated_at":"2025-03-04T16:11:14.000Z","dependencies_parsed_at":"2023-05-04T14:02:00.235Z","dependency_job_id":null,"html_url":"https://github.com/byCedric/custom-prebuild-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byCedric%2Fcustom-prebuild-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byCedric%2Fcustom-prebuild-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byCedric%2Fcustom-prebuild-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byCedric%2Fcustom-prebuild-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byCedric","download_url":"https://codeload.github.com/byCedric/custom-prebuild-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252526754,"owners_count":21762564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config-plugins","expo","react-native"],"created_at":"2024-10-03T13:08:40.737Z","updated_at":"2025-05-05T15:52:15.917Z","avatar_url":"https://github.com/byCedric.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eCustomized Prebuild Example\u003c/h1\u003e\n  \u003cp\u003eDemonstration of out-of-tree platforms with \u003ca href=\"https://docs.expo.dev/workflow/prebuild/\"\u003eprebuild\u003c/a\u003e and \u003ca href=\"https://docs.expo.dev/config-plugins/introduction/\"\u003econfig plugins\u003c/a\u003e\u003c/p\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://github.com/byCedric/custom-prebuild-example#-project-structure\"\u003e\u003cb\u003eStructure\u003c/b\u003e\u003c/a\u003e\n    \u0026ensp;\u0026mdash;\u0026ensp;\n    \u003ca href=\"https://github.com/byCedric/custom-prebuild-example#-how-to-use-it\"\u003e\u003cb\u003eUse it\u003c/b\u003e\u003c/a\u003e\n    \u0026ensp;\u0026mdash;\u0026ensp;\n    \u003ca href=\"https://github.com/byCedric/custom-prebuild-example#-how-to-customize-it\"\u003e\u003cb\u003eCustomize it\u003c/b\u003e\u003c/a\u003e\n  \u003c/p\u003e\n  \u003cbr/\u003e\n\u003c/div\u003e\n\nThis project demonstrates how Expo Prebuild could be leveraged to run on out-of-tree platforms, with fully customizable templates.\nIt's set-up to use prebuild for `android`, `ios`, `macos`, and `windows`, using the custom template from this repository.\n\n\u003e **Warning**\n\u003e We recently merged [PR #22224](https://github.com/expo/expo/pull/22224) and [PR #22201](https://github.com/expo/expo/pull/22201), which is required for this demonstration.\n\u003e Because these pull requests aren't released yet, this repository contains a modified `@expo/cli` and `@expo/config-plugin` versions. (see [./app/plugins](./app/plugins))\n\n## 📁 Project Structure\n\n- [`app`](./app) - Example app, created using `npx react-native init`\n- [`app/plugins`](./app/plugins) - All plugins required to support out-of-tree platforms\n- [`template`](./template) - A customized prebuild template\n\n## 🚀 How to use it\n\nTo get your hands dirty, follow these steps.\n\n- `$ cd ./template` - Before you can use prebuild, we have to create a template tarball\n- `$ npm pack` - This creates a tarball that we can pass to prebuild\n\nAfter this, you can generate the native files for any of the platforms below.\nAll of the platform folders (`./android`, `./ios`, `./macos`, and `./windows`) are gitignored and can be fully regenerated.\nUse `... prebuild --clean` or `rm -rf ./macos` to regenerate the files.\n\n### MacOS\n\n- `$ cd ./app` - Go to the app folder\n- `$ bundle install` - Install all gems\n- `$ yarn install` - Install all modules, including prebuild\n- `$ npx expo prebuild --platform macos --template ../template/custom-prebuild-template-1.0.0.tgz` - Use prebuild to generate the `./macos` folder\n- `$ npx pod-install macos` - Make sure the pods for `./macos` are installed\n- `$ npx react-native run-macos` - Run the project normally\n\n\u003e **Note**\n\u003e This not only generates the files from the template, it also runs the [`./app/plugins/macos/withWindowSize`](./app/plugins/macos/withWindowSize.js) plugin.\n\u003e Try to customize this in [`./app/app.json`](./app/app.json) and let prebuild configure the native files for you.\n\n### Windows\n\n- `$ cd ./app` - Go to the app folder\n- `$ yarn install` - Install all modules, including prebuild\n- `$ npx expo prebuild --platform windows --template ../template/custom-prebuild-template-1.0.0.tgz` - Use prebuild to generate the `./windows` folder\n- `$ npx react-native run-windows` - Run the project normally\n\n\u003e **Note**\n\u003e This not only generates the files from the template, it also changes settings in `windows/NuGet.Config` and `windows/ExperimentalFeatures.props`.\n\u003e Try to customize this in [`./app/app.json`](./app/app.json) and let prebuild configure the native files for you.\n\n\n### Android\n\n- `$ cd ./app` - Go to the app folder\n- `$ yarn install` - Install all modules, including prebuild\n- `$ npx expo prebuild --platform android --template ../template/custom-prebuild-template-1.0.0.tgz` - Use prebuild to generate the `./android` folder\n- `$ npx react-native run-android` - Run the project normally\n\n### iOS\n\n- `$ cd ./app` - Go to the app folder\n- `$ bundle install` - Install all gems\n- `$ yarn install` - Install all modules, including prebuild\n- `$ npx expo prebuild --platform ios --template ../template/custom-prebuild-template-1.0.0.tgz` - Use prebuild to generate the `./ios` folder\n- `$ npx pod-install ios` - Make sure the pods for `./ios` are installed\n- `$ npx react-native run-ios` - Run the project normally\n\n## 👷 How to customize it\n\nTake a look at the existing prebuild plugins, especially the `macos` or `windows` part.\nThis can be done for any platform, modifier, or change required.\n[Learn more about custom base modifiers](https://docs.expo.dev/config-plugins/development-and-debugging/#custom-base-modifiers)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cbr /\u003e\n  with\u0026nbsp;❤️\u0026nbsp;\u0026nbsp;\u003cstrong\u003eExpo\u003c/strong\u003e\n  \u003cbr /\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbycedric%2Fcustom-prebuild-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbycedric%2Fcustom-prebuild-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbycedric%2Fcustom-prebuild-example/lists"}