mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-22 11:18:15 +00:00
Add postinstall script to create symlinks
This includes a top-level "android" symlink that should allow `react-native link` command to work.
This commit is contained in:
parent
38868fe657
commit
1c1b2ec4ab
@ -10,5 +10,8 @@
|
||||
"src",
|
||||
"vendor",
|
||||
"RealmJS.xcodeproj"
|
||||
]
|
||||
],
|
||||
"scripts": {
|
||||
"postinstall": "scripts/create-symlinks.sh"
|
||||
}
|
||||
}
|
||||
|
1
react-native/android/app/src/main/jni/.npmignore
Normal file
1
react-native/android/app/src/main/jni/.npmignore
Normal file
@ -0,0 +1 @@
|
||||
core/
|
18
scripts/create-symlinks.sh
Executable file
18
scripts/create-symlinks.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
symlink() {
|
||||
[ -e "$(basename "$1")" ] || ln -s "$1"
|
||||
}
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# A top-level "android" directory is expected by `react-native link`
|
||||
symlink react-native/android
|
||||
|
||||
# NPM doesn't support publishing symlinks, so these must be re-created
|
||||
cd react-native/android/app/src/main/jni
|
||||
symlink ../../../../../../src
|
||||
symlink ../../../../../../vendor
|
Loading…
x
Reference in New Issue
Block a user