Skip to content

Commit

Permalink
Specify how to modify project configs in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
elle-j committed Jun 10, 2023
1 parent a23684b commit b3c57da
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions example-wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,64 @@ git submodule update --init --recursive
npm i
```

> <details>
> <summary> 📣 Toggle to see changes needed if moving or renaming this app directory 📣</summary>
> <br>
>
> This app is located in `realm-js/example-wasm/`. The following configurations need to be updated if moving or renaming this directory:
>
> [craco.config.ts](./craco.config.ts):
> * Replace `"../packages"` with the relative path to the `packages` folder.
> ```TypeScript
> const config: CracoConfig = {
> webpack: {
> configure(config, context) {
> // Update:
> path.resolve(__dirname, '../packages')
> },
> },
> };
> ```
> [package.json](./package.json):
> * Replace `"../packages"` with the relative path to the `packages` folder.
> ```json
> {
> "name": "@realm/example-wasm",
> "wireit": {
> "start": {
> "command": "craco start",
> "dependencies": [
> // Update:
> "../packages/realm:build:browser",
> "../packages/realm:bundle",
> "../packages/realm-react:bundle"
> ]
> },
> "build": {
> "command": "craco build",
> "dependencies": [
> // Update:
> "../packages/realm:build:browser",
> "../packages/realm:bundle",
> "../packages/realm-react:bundle"
> ]
> }
> },
> }
> ```
> [realm-js/package.json](../package.json):
> * Replace `"example-wasm"` with the relative path to the new location (e.g. `"new-folder/example-wasm"`).
> ```json
> {
> "name": "@realm/root",
> "workspaces": [
> // Update:
> "example-wasm",
> ],
> }
> ```
> </details>
### Setting up an Atlas App and Device Sync
To sync Realm data you must first:
Expand Down

0 comments on commit b3c57da

Please sign in to comment.