diff --git a/.github/actions/setup-project/action.yml b/.github/actions/setup-project/action.yml index dcd7280..0822bec 100644 --- a/.github/actions/setup-project/action.yml +++ b/.github/actions/setup-project/action.yml @@ -10,15 +10,11 @@ inputs: description: Version of Node to install default: 20.x - with-webui: - description: If the setup should prepare the web UI - type: boolean - runs: using: composite steps: - name: ๐Ÿ— Setup Node - uses: oven-sh/setup-bun@v1 + uses: oven-sh/setup-bun@v2 with: bun-version: ${{ inputs.bun-version }} @@ -31,18 +27,12 @@ runs: run: bun install shell: bash - - name: ๐Ÿ“ฆ Install webui dependencies - if: ${{ inputs.with-webui == 'true' }} - run: bun install - working-directory: webui - shell: bash - - - name: โ™ป๏ธ Restore webui cache + - name: โ™ป๏ธ Restore Metro cache if: ${{ inputs.with-webui == 'true' }} uses: actions/cache@v4 with: - key: webui-metro-${{ runner.os }}-${{ github.sha }} + key: metro-${{ runner.os }}-${{ github.sha }} restore-keys: | - webui-metro-${{ runner.os }} + metro-${{ runner.os }} path: | - webui/node_modules/.cache/metro + packages/expo-atlas-ui/node_modules/.cache/metro diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 46296a9..94e963e 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -12,7 +12,7 @@ concurrency: cancel-in-progress: true jobs: - core: + test: runs-on: ubuntu-latest steps: - name: ๐Ÿ— Setup repo @@ -21,39 +21,14 @@ jobs: - name: ๐Ÿ— Setup project uses: ./.github/actions/setup-project - - name: ๐Ÿšจ Lint core - run: bun run lint -- --max-warnings 0 + - name: ๐Ÿšจ Lint project + run: bun run lint - - name: ๐Ÿ“‹ Typecheck core + - name: ๐Ÿ“‹ Typecheck project run: bun run typecheck - - name: ๐Ÿงช Test core - run: bun test + - name: ๐Ÿงช Test project + run: bun run test - - name: ๐Ÿ‘ท Build core + - name: ๐Ÿ‘ท Build expo-atlas-ui run: bun run build - - webui: - runs-on: ubuntu-latest - steps: - - name: ๐Ÿ— Setup repo - uses: actions/checkout@v4 - - - name: ๐Ÿ— Setup project - uses: ./.github/actions/setup-project - with: - with-webui: true - - # Required for typechecking webui - - name: ๐Ÿ‘ท Build core - run: bun run build - - - name: ๐Ÿ“‹ Typecheck webui - run: bun run typecheck - working-directory: webui - - - name: ๐Ÿ‘ท Build webui - run: bun run build - working-directory: webui - env: - EXPO_USE_FAST_RESOLVER: true # Use the faster Metro resolver in SDK 51 diff --git a/apps/example/package.json b/apps/example/package.json index d410ca3..1bedc22 100644 --- a/apps/example/package.json +++ b/apps/example/package.json @@ -1,5 +1,6 @@ { - "name": "expo-atlas-example", + "private": true, + "name": "example-app", "main": "expo-router/entry", "version": "1.0.0", "scripts": { @@ -44,6 +45,5 @@ "jest-expo": "~51.0.3", "react-test-renderer": "18.2.0", "typescript": "~5.3.3" - }, - "private": true + } } diff --git a/bun.lockb b/bun.lockb index 8a2412d..f372ce7 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index ee6ce89..c996ca4 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,15 @@ "apps/*", "packages/*" ], + "scripts": { + "postinstall": "bun run --filter expo-atlas build", + "build": "bun run --filter expo-atlas* build", + "clean": "bun run --filter expo-atlas* clean", + "lint": "bun run --filter expo-atlas* lint", + "start": "bun run --filter expo-atlas* start", + "test": "bun run --filter expo-atlas* test", + "typecheck": "bun run --filter expo-atlas* typecheck" + }, "dependencies": { "eslint": "^8.57.0", "eslint-config-universe": "^13.0.0", diff --git a/packages/expo-atlas-ui/package.json b/packages/expo-atlas-ui/package.json index ab11469..a9907a3 100644 --- a/packages/expo-atlas-ui/package.json +++ b/packages/expo-atlas-ui/package.json @@ -4,14 +4,15 @@ "version": "0.0.1-private", "main": "src/index.ts", "scripts": { + "build": "expo export --platform web", + "clean": "git clean -xdf build", + "lint": "eslint . --ext js,ts,tsx", "start": "expo start", + "typecheck": "tsc --noEmit", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", - "build": "expo export --platform web", - "typecheck": "expo-module typecheck", - "production": "EXPO_ATLAS_NO_VALIDATION=true node ../build/src/cli/bin.js ./fixture/atlas-tabs-50.jsonl", - "lint": "eslint . --ext js,ts,tsx" + "production": "EXPO_ATLAS_NO_VALIDATION=true node ../build/src/cli/bin.js ./fixture/atlas-tabs-50.jsonl" }, "dependencies": { "@expo/styleguide": "^8.2.2", diff --git a/packages/expo-atlas/package.json b/packages/expo-atlas/package.json index 1da7c17..4daca60 100644 --- a/packages/expo-atlas/package.json +++ b/packages/expo-atlas/package.json @@ -31,10 +31,12 @@ "url": "https://github.com/expo/expo-atlas" }, "scripts": { - "build": "expo-module build", - "clean": "expo-module clean", + "build": "tsc", + "clean": "git clean -xdf build", "lint": "eslint . --ext js,ts,tsx", - "typecheck": "expo-module typecheck" + "start": "tsc --watch", + "test": "bun test", + "typecheck": "tsc --noEmit" }, "license": "MIT", "dependencies": {