Skip to content
Closed

NX CI #103

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
79 changes: 79 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,82 @@ apps/paper/ios/Pods
apps/vendor/

.turbo



.nx/cache
.nx/workspace-data

# React Native

# 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

# 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


## Nested node_modules

node_modules/
8 changes: 4 additions & 4 deletions apps/paper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"scripts": {
"lint": "eslint . --ext .ts,.tsx --max-warnings 0 --cache --fix",
"tsc": "tsc --noEmit",
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"android": "nx run-android",
"ios": "nx run-ios",
"start": "nx react-native:start",
"build:android": "cd android && ./gradlew assembleDebug --warning-mode all",
"build:ios": "npm run mkdist && react-native bundle --entry-file index.js --platform ios --dev true --bundle-output dist/main.ios.jsbundle --assets-dest dist && react-native build-ios --scheme WgpuExample --mode Debug --extra-params \"-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO\"",
"build:ios": "npm run mkdist && nx bundle --entry-file index.js --platform ios --dev true --bundle-output dist/main.ios.jsbundle --assets-dest dist && nx build-ios --scheme WgpuExample --mode Debug --extra-params \"-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO\"",
"mkdist": "node -e \"require('node:fs').mkdirSync('dist', { recursive: true, mode: 0o755 })\""
},
"dependencies": {
Expand Down
34 changes: 34 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"workspaceLayout": {
"appsDir": "apps",
"libsDir": "packages"
},
"targetDefaults": {
"build:android": {
"outputs": ["{projectRoot}/apps/*/android/build"],
"cache": true
},
"build:ios": {
"outputs": ["{projectRoot}/apps/*/ios/build"],
"cache": true
}
},
"defaultBase": "main",
"plugins": [
{
"plugin": "@nx/react-native/plugin",
"options": {
"startTargetName": "react-native:start",
"upgradeTargetName": "update",
"bundleTargetName": "bundle",
"podInstallTargetName": "pod-install",
"runIosTargetName": "run-ios",
"runAndroidTargetName": "run-android",
"buildIosTargetName": "build-ios",
"buildAndroidTargetName": "build-android",
"syncDepsTargetName": "sync-deps"
}
}
]
}
16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
},
"packageManager": "yarn@3.6.1",
"scripts": {
"lint": "turbo run lint",
"tsc": "turbo run tsc",
"build:ios": "turbo run build:ios",
"build:android": "turbo run build:android"
"lint": "yarn nx run-many -t lint",
"tsc": "yarn nx run-many -t tsc",
"build:ios": "yarn nx run-many -t build:ios",
"build:android": "yarn nx run-many -t build:android"
},
"devDependencies": {
"turbo": "^2.1.0"
"@nx/react-native": "19.6.5",
"nx": "19.6.5"
},
"dependencies": {
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.1"
}
}
52 changes: 0 additions & 52 deletions turbo.json

This file was deleted.

Loading
Loading