Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[cli][eject] Support projects with dynamic or missing configs #2464

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

EvanBacon
Copy link
Contributor

Why

  • expo-cli supports running and publishing projects without a config or with a dynamic .js config so eject should too.
  • crna templates don't have configs but people may want to eject them immediately to use them as bare templates.

How

  • Strip slashes from name android package name suggestion to be more resilient.
    • ex: I run expo eject in a project folder my-cool-app (which doesn't have a config or name), the suggestion would've been blank cuz com.bacon.my-cool-app is invalid. Now it'll recommend com.bacon.mycoolapp.
  • When the config file doesn't exist, write the generated config to ./app.json
    • we don't need to account for custom config paths --config because those are validated beforehand.
  • Remove code that attempts to read from ./app.json which fails when a project uses a dynamic app.config.js file.

@EvanBacon EvanBacon added enhancement New feature or request expo eject This issue pertains to the command expo eject labels Aug 14, 2020
@EvanBacon EvanBacon self-assigned this Aug 14, 2020
@EvanBacon EvanBacon merged commit ad61fa9 into master Aug 17, 2020
@EvanBacon EvanBacon deleted the @evanbacon/cli/eject/no-config-workflow branch August 17, 2020 20:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request expo eject This issue pertains to the command expo eject
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants