Skip to content

Commit

Permalink
[docs] Update default branch to main
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvatne committed Jan 26, 2022
1 parent 4684304 commit 1ebd032
Show file tree
Hide file tree
Showing 164 changed files with 205 additions and 205 deletions.
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ so don't worry if you have code changes or such elsewhere.

## Deployment

The docs are deployed automatically via a GitHub Action each time a PR with docs changes is merged to `master`.
The docs are deployed automatically via a GitHub Action each time a PR with docs changes is merged to `main`.

## How-tos

Expand Down Expand Up @@ -173,7 +173,7 @@ You can import the React Native docs in an automated way into these docs.
This will write all the relevant RN doc stuff into the unversioned version directory.
You may need to tweak the script as the source docs change; the script hackily translates between the different forms of markdown that have different quirks.

The React Native docs are actually versioned but we currently read off of master.
The React Native docs are actually versioned but we currently read off of main.

### Adding Images and Assets

Expand Down Expand Up @@ -276,5 +276,5 @@ If you have a codeblock using `/* @info */` highlighting, use `<!-- prettier-ign
## TODOs:

- Handle image sizing in imports better
- Read from the appropriate version (configurable) of the React Native docs, not just master
- Read from the appropriate version (configurable) of the React Native docs, not just main
- Make Snack embeds work; these are marked in some of the React Native docs but they are just imported as plain JS code blocks
2 changes: 1 addition & 1 deletion docs/components/plugins/InstallSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type Props = {
};

const getPackageLink = (packageNames: string) =>
`https://github.com/expo/expo/tree/master/packages/${packageNames.split(' ')[0]}`;
`https://github.com/expo/expo/tree/main/packages/${packageNames.split(' ')[0]}`;

const InstallSection: React.FC<Props> = ({
packageName,
Expand Down
6 changes: 3 additions & 3 deletions docs/dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ function warnIfOnlyOneVersionChanged() {
function getSuggestion(version, name) {
if (version === 'unversioned') {
let path = `docs/pages/versions/v${LATEST_VERSION}/${name}`;
let url = `https://github.com/expo/expo/blob/master/${path}`;
let url = `https://github.com/expo/expo/tree/main/${path}`;
return `Please consider copying the changes to the [latest released version](${url}) if applicable.`;
} else if (version === `v${LATEST_VERSION}`) {
let path = `docs/pages/versions/unversioned/${name}`;
let url = `https://github.com/expo/expo/blob/master/${path}`;
let url = `https://github.com/expo/expo/tree/main/${path}`;
return `Please make sure this change won't be lost on the next SDK release by updating the [unversioned copy](${url}).`;
} else {
return `You may also want to make these changes to other versions of the documentation, where applicable, in the [docs/pages/versions](https://github.com/expo/expo/tree/master/docs/pages/versions) directory.`;
return `You may also want to make these changes to other versions of the documentation, where applicable, in the [docs/pages/versions](https://github.com/expo/expo/tree/main/docs/pages/versions) directory.`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/bare/existing-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_title: Existing Apps

If you want to use parts of the Expo SDK in your existing React Native app, you are in the right place.

**Most packages in the Expo SDK depend on a module tooling installed with the [expo](https://github.com/expo/expo/tree/master/packages/expo) package. Once it is installed and configured in your app, you can install other packages from the Expo SDK just as you would any other React Native library.**
**Most packages in the Expo SDK depend on a module tooling installed with the [expo](https://github.com/expo/expo/tree/main/packages/expo) package. Once it is installed and configured in your app, you can install other packages from the Expo SDK just as you would any other React Native library.**

## Setting up the `expo` package

Expand Down
4 changes: 2 additions & 2 deletions docs/pages/bare/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Bare template projects come with `expo` installed and configured, so you're read

## Install an Expo SDK package

We're going to install [`expo-web-browser`](https://github.com/expo/expo/tree/master/packages/expo-web-browser), it's a useful little package for showing a modal web browser using the appropriate native APIs on each platform.
We're going to install [`expo-web-browser`](https://github.com/expo/expo/tree/main/packages/expo-web-browser), it's a useful little package for showing a modal web browser using the appropriate native APIs on each platform.

```sh
expo install expo-web-browser
Expand All @@ -53,7 +53,7 @@ export default function App() {
}
```

This will not yet work because we haven't linked the native code that powers it. To do this, we need to follow the instructions in the [`expo-web-browser` README](https://github.com/expo/expo/tree/master/packages/expo-web-browser) to configure it for iOS and Android. Let's do it.
This will not yet work because we haven't linked the native code that powers it. To do this, we need to follow the instructions in the [`expo-web-browser` README](https://github.com/expo/expo/tree/main/packages/expo-web-browser) to configure it for iOS and Android. Let's do it.

### iOS configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/bare/installing-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ By default, `expo-updates` requires no additional setup. If you want to customiz

## Usage

See more information about usage in the [expo-updates README](https://github.com/expo/expo/blob/master/packages/expo-updates/README.md).
See more information about usage in the [expo-updates README](https://github.com/expo/expo/tree/main/packages/expo-updates/README.md).
2 changes: 1 addition & 1 deletion docs/pages/bare/updating-your-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In this guide, an **update** refers to a single, atomic update, which may consis

If possible, we highly recommend starting with a boilerplate project that has the `expo-updates` library already installed. Running `expo init` and choosing either of the bare workflow templates will give you such a template.

To install the `expo-updates` module in an existing bare workflow app, follow the [installation instructions in the package README](https://github.com/expo/expo/blob/master/packages/expo-updates/README.md#installation).
To install the `expo-updates` module in an existing bare workflow app, follow the [installation instructions in the package README](https://github.com/expo/expo/tree/main/packages/expo-updates/README.md#installation).

Additionally, you'll need to host your updates and their respective assets (JavaScript bundles, images, fonts, etc.) on a server somewhere that deployed client apps can access. `expo-cli` provides a couple of easy options for this: (1) `expo export` creates prebuilt update packages that you can upload to any static hosting site (e.g. GitHub Pages), and (2) `expo publish` packages and deploys your updates to Expo's updates service, which is part of the services we offer.

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/build-reference/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Support for custom entry points is in progress and is coming soon.

Classic builds had no knowledge of your repository set up, you could use a monorepo or birepo or trirepo, the service was entirely indifferent. As long as you were able to publish a bundle, that's all that was needed. EAS Build needs to be able to install all of your project dependencies and essentially set up your development environment inside of a worker, so in some cases that will require some additional configuration. Learn more: ["How to set up EAS Build with a monorepo"](/build-reference/how-tos.md#how-to-set-up-eas-build-with).

> Work is in progress to improve monorepo support for EAS Build managed projects. We recommend using [expo-yarn-workspaces](https://github.com/expo/expo/blob/master/packages/expo-yarn-workspaces/README.md).
> Work is in progress to improve monorepo support for EAS Build managed projects. We recommend using [expo-yarn-workspaces](https://github.com/expo/expo/tree/main/packages/expo-yarn-workspaces/README.md).
### Environment variables used by your app need to be defined for EAS Build

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/development/development-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ receive a response with an SVG image containing a QR code that can be easily sca

## Example Workflows

These are a few examples of workflows to help your team get the most out of your development build. If you come up with others that would be useful for other teams, please [submit a PR](https://github.com/expo/expo/blob/master/CONTRIBUTING.md#-updating-documentation) to share your knowledge!
These are a few examples of workflows to help your team get the most out of your development build. If you come up with others that would be useful for other teams, please [submit a PR](https://github.com/expo/expo/tree/main/CONTRIBUTING.md#-updating-documentation) to share your knowledge!

### Development Builds

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/distribution/app-stores.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ If your app asks for [system permissions](../versions/latest/sdk/permissions.md)
},
```

The full list of keys Expo provides by default can be seen [here](https://github.com/expo/expo/blob/master/exponent-view-template/ios/exponent-view-template/Supporting/Info.plist#L28-L45). Unlike with Android, on iOS it is not possible to filter the list of permissions an app may request at a native level. This means that by default, your app will ship with all of these default boilerplate strings embedded in the binary. You can provide any overrides you want in the `infoPlist` configuration. Because these strings are configured at the native level, they will only be published when you build a new binary with `expo build`.
The full list of keys Expo provides by default can be seen [here](https://github.com/expo/expo/tree/main/exponent-view-template/ios/exponent-view-template/Supporting/Info.plist#L28-L45). Unlike with Android, on iOS it is not possible to filter the list of permissions an app may request at a native level. This means that by default, your app will ship with all of these default boilerplate strings embedded in the binary. You can provide any overrides you want in the `infoPlist` configuration. Because these strings are configured at the native level, they will only be published when you build a new binary with `expo build`.

## Localizing your iOS app

Expand Down
6 changes: 3 additions & 3 deletions docs/pages/expokit/expokit.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ If upgrading from SDK 32 or below:
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
use_unimodules!
```
This will introduce your project to autoinstallable unimodules. More information can be found on the [`react-native-unimodules` repository](https://github.com/expo/expo/tree/master/packages/react-native-unimodules).
This will introduce your project to autoinstallable unimodules. More information can be found on the [`react-native-unimodules` repository](https://github.com/expo/expo/tree/main/packages/react-native-unimodules).
3. Upgrade CocoaPods to some version higher or equal 1.6. (At the moment of writing the latest version is 1.7.1, we have tested it works. You will probably need to run `gem update cocoapods`, but the exact command will depend on your setup.)
4. Change the whole `post_install` block at the bottom of the `Podfile` to

Expand Down Expand Up @@ -183,8 +183,8 @@ If upgrading from SDK 31 or below, you'll need to refactor your `AppDelegate` cl
If you have never made any edits to your Expo-generated `AppDelegate` files, then you can just replace them with these new template files:
- [AppDelegate.h](https://github.com/expo/expo/blob/master/exponent-view-template/ios/exponent-view-template/AppDelegate.h)
- [AppDelegate.m](https://github.com/expo/expo/blob/master/exponent-view-template/ios/exponent-view-template/AppDelegate.m)
- [AppDelegate.h](https://github.com/expo/expo/tree/main/exponent-view-template/ios/exponent-view-template/AppDelegate.h)
- [AppDelegate.m](https://github.com/expo/expo/tree/main/exponent-view-template/ios/exponent-view-template/AppDelegate.m)
If you override any `AppDelegate` methods to add custom behavior, you'll need to either refactor your `AppDelegate` to subclass `EXStandaloneAppDelegate` and call `super` methods when necessary, or start with the new template files above and add your custom logic again (be sure to keep the calls to `super` methods).
Expand Down
16 changes: 8 additions & 8 deletions docs/pages/guides/config-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ Because of this reasoning, the root of a Node module is searched instead of righ

> Use [modifier previews](https://github.com/expo/vscode-expo#expo-preview-modifier) to debug the results of your plugin live.
To make plugin development easier, we've added plugin support to [`expo-module-scripts`](https://www.npmjs.com/package/expo-module-scripts). Refer to the [config plugins guide](https://github.com/expo/expo/tree/master/packages/expo-module-scripts#-config-plugin) for more info on using TypeScript, and Jest to build plugins.
To make plugin development easier, we've added plugin support to [`expo-module-scripts`](https://www.npmjs.com/package/expo-module-scripts). Refer to the [config plugins guide](https://github.com/expo/expo/tree/main/packages/expo-module-scripts#-config-plugin) for more info on using TypeScript, and Jest to build plugins.

Plugins will generally have `@expo/config-plugins` installed as a dependency, and `expo-module-scripts`, `@expo/config-types` installed as a devDependencies.

Expand All @@ -494,7 +494,7 @@ You can develop plugins easily using JS, but if you want to setup Jest tests and
A monorepo will enable you to work on a node module and import it in your Expo app like you would if it were published to NPM. Expo config plugins have full monorepo support built-in so all you need to do is setup a project.

We recommend using [`expo-yarn-workspaces`](https://www.npmjs.com/package/expo-yarn-workspaces) which makes Expo monorepos very easy to setup.
In your monorepo's `packages/` folder, create a module, and [bootstrap a config plugin](https://github.com/expo/expo/tree/master/packages/expo-module-scripts#-config-plugin) in it.
In your monorepo's `packages/` folder, create a module, and [bootstrap a config plugin](https://github.com/expo/expo/tree/main/packages/expo-module-scripts#-config-plugin) in it.

### Manually running a plugin

Expand Down Expand Up @@ -592,7 +592,7 @@ Podfile configuration is often done with environment variables:
- `process.env.EXPO_USE_SOURCE` when set to `1`, Expo modules will install source code instead of xcframeworks.
- `process.env.CI` in some projects, when set to `0`, Flipper installation will be skipped.

We do expose one mechanism for safely interacting with the Podfile, but it's very limited. The versioned [template Podfile](https://github.com/expo/expo/blob/master/templates/expo-template-bare-minimum/ios/Podfile) is hard coded to read from a static JSON file **Podfile.properties.json**, we expose a mod (`ios.podfileProperties`, `withPodfileProperties`) to safely read and write from this file.
We do expose one mechanism for safely interacting with the Podfile, but it's very limited. The versioned [template Podfile](https://github.com/expo/expo/tree/main/templates/expo-template-bare-minimum/ios/Podfile) is hard coded to read from a static JSON file **Podfile.properties.json**, we expose a mod (`ios.podfileProperties`, `withPodfileProperties`) to safely read and write from this file.

In Expo SDK 43, the **Podfile.properties.json** only supports the following configuration:

Expand Down Expand Up @@ -647,7 +647,7 @@ export default createRunOncePlugin(
- **Leverage built-in plugins**: Account for built-in plugins from the [prebuild config](https://github.com/expo/expo-cli/blob/master/packages/prebuild-config/src/plugins/withDefaultPlugins.ts). Some features are included for historical reasons, like the ability to automatically copy and link [Google services files](https://github.com/expo/expo-cli/blob/3a0ef962a27525a0fe4b7e5567fb7b3fb18ec786/packages/config-plugins/src/ios/Google.ts#L15) defined in the Expo config. If there is overlap, then maybe recommend the user uses the built-in types to keep your plugin as simple as possible.
- **Split up plugins by platform**: For example — `withIosSplash`, `withAndroidSplash`. This makes using the `--platform` flag in `expo prebuild` a bit easier to follow in `EXPO_DEBUG` mode.
- **Unit test your plugin**: Write Jest tests for complex modifications. If your plugin requires access to the filesystem, use a mock system (we strongly recommend [`memfs`][memfs]), you can see examples of this in the [`expo-notifications`](https://github.com/expo/expo/blob/fc3fb2e81ad3a62332fa1ba6956c1df1c3186464/packages/expo-notifications/plugin/src/__tests__/withNotificationsAndroid-test.ts#L34) plugin tests.
- Notice the root [**/__mocks__**](https://github.com/expo/expo/tree/master/packages/expo-notifications/plugin/__mocks__) folder and [**plugin/jest.config.js**](https://github.com/expo/expo/blob/master/packages/expo-notifications/plugin/jest.config.js).
- Notice the root [**/__mocks__**](https://github.com/expo/expo/tree/main/packages/expo-notifications/plugin/__mocks__) folder and [**plugin/jest.config.js**](https://github.com/expo/expo/tree/main/packages/expo-notifications/plugin/jest.config.js).
- A TypeScript plugin is always better than a JavaScript plugin. Check out the [`expo-module-script` plugin][ems-plugin] tooling for more info.
- Do not modify the `sdkVersion` via a config plugin, this can break commands like `expo install` and cause other unexpected issues.

Expand Down Expand Up @@ -1084,14 +1084,14 @@ Please add the following to your Expo config
[prebuild-config]: https://github.com/expo/expo-cli/tree/master/packages/prebuild-config#readme
[cli-prebuild]: /workflow/expo-cli/#eject
[configplugin]: https://github.com/expo/expo-cli/blob/3a0ef962a27525a0fe4b7e5567fb7b3fb18ec786/packages/config-plugins/src/Plugin.types.ts#L76
[source-template]: https://github.com/expo/expo/tree/master/templates/expo-template-bare-minimum
[expo-beta-docs]: https://github.com/expo/expo/blob/master/guides/releasing/Release%20Workflow.md#stage-5---beta-release
[source-template]: https://github.com/expo/expo/tree/main/templates/expo-template-bare-minimum
[expo-beta-docs]: https://github.com/expo/expo/tree/main/guides/releasing/Release%20Workflow.md#stage-5---beta-release
[vscode-expo]: https://marketplace.visualstudio.com/items?itemName=byCedric.vscode-expo
[ems-plugin]: https://github.com/expo/expo/tree/master/packages/expo-module-scripts#-config-plugin
[ems-plugin]: https://github.com/expo/expo/tree/main/packages/expo-module-scripts#-config-plugin
[xml2js]: https://www.npmjs.com/package/xml2js
[expo-plist]: https://www.npmjs.com/package/@expo/plist
[memfs]: https://www.npmjs.com/package/memfs
[emc]: https://github.com/expo/expo/tree/master/packages/expo-modules-core
[emc]: https://github.com/expo/expo/tree/main/packages/expo-modules-core

<!-- TODO: Better link for Expo autolinking docs -->

Expand Down
Loading

0 comments on commit 1ebd032

Please sign in to comment.