Skip to content

Commit

Permalink
[guides] Clean up outdated pages
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvatne committed Aug 22, 2022
1 parent 4a28459 commit 30a0554
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 88 deletions.
2 changes: 2 additions & 0 deletions guides/Creating Unimodules.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Creating Unimodules

> **Warning:** This doc is outdated and will be updated soon.
Expo is moving towards a more extensible and configurable architecture, where different parts of the SDK can live with or without each other. We call those different parts of the SDK the Foundation unimodules.

This rearchitecture will allow Expo users omit certain parts of the SDK they won't use, like Face Detector or GL.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Expo Universal Module Development Guide
# Expo Module Development Guide

- [Generating a new universal module using `expo-cli` command](#generating-a-new-universal-module-using--expo-cli--command)
> **Warning:** This doc is outdated and will be updated soon.
- [Generating a new module using `expo-cli` command](#generating-a-new-module-using-expo-cli-command)
- [The Standard Configuration](#the-standard-configuration)
- [npm Scripts](#npm-scripts)
- [Auto-generated Configuration Files](#auto-generated-configuration-files)
Expand All @@ -9,22 +11,22 @@
- [Fast Unit Tests](#fast-unit-tests)
- [package.json Fields](#packagejson-fields)

This guide explains the standard configuration and tools for working on universal modules in this repository. One of our goals is to write a coherent, high-quality SDK that is consistent across APIs and stays reliable in a way that is sustainable for the Expo team. Another goal is to reuse knowledge from working on one module and apply it to others by reducing disparity and fragmentation between modules. Expo has many modules and we need to keep Expo and working on Expo simple.
This guide explains the standard configuration and tools for working on modules in this repository. One of our goals is to write a coherent, high-quality SDK that is consistent across APIs and stays reliable in a way that is sustainable for the Expo team. Another goal is to reuse knowledge from working on one module and apply it to others by reducing disparity and fragmentation between modules. Expo has many modules and we need to keep Expo and working on Expo simple.

# Generating a new universal module using `expo-cli` command
# Generating a new module using `expo-cli` command

`expo-cli` has specific command that would generate universal module that support TypeScript!
`expo-cli` has specific command that would generate module that support TypeScript!
Run:

- `expo generate-module [new module directory]`
- optional `[new module directory]` parameter lets you specify module name (e.g. `expo generate-module expo-test-module` would create `expo-test-module`. If ommited, the script will prompt you about it.
- optional `--template <template directory>` will try to use provided `<template directory>` in universal module creation.
- optional `--template <template directory>` will try to use provided `<template directory>` in module creation.

# The Standard Configuration

We use a shared set of configuration files and tools like TypeScript across universal modules. The `expo-module-scripts` package is the source of truth for much of the configuration. With Yarn workspaces, all universal modules use the same version of `expo-module-scripts`, helping us structurally ensure we use the same configuration across modules and uniformly use the same versions of Babel, TypeScript, Jest, and other tools.
We use a shared set of configuration files and tools like TypeScript across modules. The `expo-module-scripts` package is the source of truth for much of the configuration. With Yarn workspaces, all modules use the same version of `expo-module-scripts`, helping us structurally ensure we use the same configuration across modules and uniformly use the same versions of Babel, TypeScript, Jest, and other tools.

In a universal module, include `expo-module-scripts` as a development dependency in package.json:
In a module, include `expo-module-scripts` as a development dependency in package.json:

```json
{
Expand Down Expand Up @@ -61,7 +63,7 @@ The `postinstall` script auto-generates configuration files in the package when

## Directory Structure

`expo-module-scripts` expects modules to be written in TypeScript under a directory named `src` and will compile the modules to a directory named `build`. **In a universal module package, commit the `build` directory to Git.** Only the people working on a module need to compile it instead of everyone needing to run `tsc` in each package whenever their local Git repository changes.
`expo-module-scripts` expects modules to be written in TypeScript under a directory named `src` and will compile the modules to a directory named `build`. **In a module package, commit the `build` directory to Git.** Only the people working on a module need to compile it instead of everyone needing to run `tsc` in each package whenever their local Git repository changes.

In package.json, define the main module of the package to be the compiled entry point under `build`:

Expand Down Expand Up @@ -97,7 +99,7 @@ Run `yarn test` to run Jest in watcher mode. By default, Jest will run tests aff

# package.json Fields

Inside of package.json, set the repository and bugs URLs to the Expo repository. For the homepage URL, link to the source of the universal module.
Inside of package.json, set the repository and bugs URLs to the Expo repository. For the homepage URL, link to the source of the module.

```json
{
Expand Down
2 changes: 1 addition & 1 deletion guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Read these guides to begin contributing to Expo.
- [Expo JavaScript Style Guide](Expo%20JavaScript%20Style%20Guide.md)
- [Writing API documentation](Writing%20API%20Documentation.md)
- [Git and Code Reviews](Git%20and%20Code%20Reviews.md)
- [Expo Universal Module Infrastructure](Expo%20Universal%20Module%20Infrastructure.md)
- [Expo Module Infrastructure](Expo%20Module%20Infrastructure.md)

This file was deleted.

46 changes: 0 additions & 46 deletions guides/Using Turtle locally.md

This file was deleted.

0 comments on commit 30a0554

Please sign in to comment.