add postinstall script for react-native-codegen

This commit is contained in:
Brendan Allan
2022-10-17 23:42:32 +08:00
parent f32dd89111
commit 60df0aaa53
6 changed files with 19 additions and 5 deletions

2
.npmrc
View File

@@ -1 +1,3 @@
; necessary for metro + mobile
strict-peer-dependencies=false
node-linker=hoisted

View File

@@ -1,3 +0,0 @@
strict-peer-dependencies = false
ignore-workspace-root-check = true
; shamefully-hoist = true

View File

@@ -8,7 +8,8 @@
"android": "expo run:android",
"ios": "expo run:ios",
"xcode": "open ios/spacedrive.xcworkspace",
"lint": "eslint src/**/*.{ts,tsx} && tsc --noEmit"
"lint": "eslint src/**/*.{ts,tsx} && tsc --noEmit",
"postinstall": "node scripts/postinstall.js"
},
"dependencies": {
"@gorhom/bottom-sheet": "^4.4.3",

View File

@@ -0,0 +1,13 @@
// @ts-check
let fs = require('fs-extra');
let path = require('path');
async function copyReactNativeCodegen() {
const sourcePath = path.join(__dirname, '../../../node_modules/react-native-codegen');
const destPath = path.join(__dirname, '../node_modules/react-native-codegen');
await fs.remove(destPath).catch(() => {});
await fs.move(sourcePath, destPath);
}
copyReactNativeCodegen();

View File

@@ -11,12 +11,13 @@
"format": "prettier --config .prettierrc.js --write \"**/*.{ts,tsx,html,scss,json,yml,md}\"",
"desktop": "pnpm --filter @sd/desktop --",
"web": "pnpm --filter @sd/web -- ",
"mobile": "pnpm --filter @sd/mobile --",
"server": "pnpm --filter @sd/server -- ",
"landing": "pnpm --filter @sd/landing -- ",
"ui": "pnpm --filter @sd/ui -- ",
"interface": "pnpm --filter @sd/interface -- ",
"docs": "pnpm --filter @sd/docs -- ",
"client": "pnpm --filter @sd/client -- ",
"server": "pnpm --filter @sd/server -- ",
"prisma": "cd core && cargo prisma",
"codegen": "cargo test -p sd-core api::tests::test_and_export_rspc_bindings -- --exact",
"typecheck": "pnpm -r exec tsc"

BIN
pnpm-lock.yaml generated
View File

Binary file not shown.