Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,23 @@ npm run typecheck # tsc --noEmit

```sh
npm run ios:plugin # one-time: gem install cocoapods-spm
cd example/ios-app && npm install && cd - # one-time
npm run ios:install # one-time: npm install in example/ios-app
npm run ios:run # build + launch on iOS simulator
npm run ios:dev # concurrently: clean Metro + run:ios
```

Other scripts: `ios:start`, `ios:clear`, `ios:run:device`, `ios:run:device:release`. Pod install is handled by `expo run:ios` (Expo CNG) — no separate `ios:pods`.
Pod install is handled by `expo run:ios` (Expo CNG) — no separate `ios:pods`.

### Running the macOS example

```sh
npm run macos:plugin # one-time: gem install cocoapods-spm (shared)
npm run macos:install # one-time: npm install --legacy-peer-deps
npm run macos:pods # pod install in example/macos-app/macos
npm run macos:dev # Metro + run-macos, concurrently
```

Unlike Expo's `expo run:ios`, `react-native run-macos` doesn't start Metro itself — `macos:dev` runs both side by side. Pods are managed by hand via `macos:pods` (and `macos:clean` to wipe). If you prefer separate terminals: `macos:start` + `macos:run`.

See [docs/installation.md](docs/installation.md) for why `cocoapods-spm` is required.

Expand Down
14 changes: 7 additions & 7 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Examples

Each example is a runnable Expo / React Native app under [`example/`](../example/).
Each example is a runnable app under [`example/`](../example/).

| Platform | App | Issue | Status |
| --- | --- | --- | --- |
| iOS | [`example/ios-app/`](../example/ios-app/) | [#7](https://github.com/workspace-sh/react-native-source-editor/issues/7) | Done |
| macOS | `example/macos-app/` | [#17](https://github.com/workspace-sh/react-native-source-editor/issues/17) | Planned |
| Platform | App | Toolchain | Issue | Status |
| --- | --- | --- | --- | --- |
| iOS | [`example/ios-app/`](../example/ios-app/) | Expo SDK 55 (CNG) | [#7](https://github.com/workspace-sh/react-native-source-editor/issues/7) | Done |
| macOS | [`example/macos-app/`](../example/macos-app/) | `react-native-macos` 0.81 | [#17](https://github.com/workspace-sh/react-native-source-editor/issues/17) | Done |

Each app demonstrates the editor in a split-pane layout with markdown on one side and plaintext on the other, alongside standard RN components (`Switch`, `Button`, `SafeAreaView`) so the integration story is visible.
Each app exercises the same library across its native target and demonstrates per-language syntax highlighting plus a preview pane (Markdown / HTML rendered, JS / TS console output captured).

See each app's `README.md` for prerequisites and run instructions.
See each app's `README.md` for prerequisites and run instructions. The two apps use deliberately different toolchains and idioms — iOS uses Expo CNG with `app.json` plugins; macOS uses plain RN with manual Podfile wiring — because that's how downstream consumers will actually build them.
2 changes: 2 additions & 0 deletions example/macos-app/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
4 changes: 4 additions & 0 deletions example/macos-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native',
};
75 changes: 75 additions & 0 deletions example/macos-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
**/.xcode.env.local

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore
.kotlin/

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
**/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
5 changes: 5 additions & 0 deletions example/macos-app/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
arrowParens: 'avoid',
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions example/macos-app/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading
Loading