diff --git a/README.md b/README.md index 8b1608eb..46444a3b 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,49 @@ To build for Android: - `./gradlew publishAndroid` - The compiled version of the Android module is here: `/android` +To build for nodejs: + +``` +npm install --build-from-souce +``` + + - On Windows you will need to setup the environment for node-gyp + + - Option 1: Install windows-build-tools node package + + - Open an elevated command prompt (As Administrator) + + ``` + npm install -g --production windows-build-tools + ``` + + * Option 2: Manually install and configure + + - Check [node-gyp](https://github.com/nodejs/node-gyp) manual for custom installation procedure for Windows + + +## Running the tests + +You can use scripts/tests.sh to run the various tests. +You will need yarn installed on the machine. + +test.sh options + + * eslint - lints the sources + * realmjs - runs all tests on quick simulated environment + * react-tests - runs all React Native tests on iOS Simulator + * react-tests-android runs all React Native Android tests on Android emulator + * node - runs all tests for node + * node-nosync - runs all tests for node without sync support + * test-runners - checks supported tests runners are working correctly + + +You can attach a debugger to react-native tests by passing "Debug" to the tests.sh script. A Chrome browser will open and connect to the react native application. Use the built-in Chrome Debugger to debug the code. + +``` +./tests.sh react-tests Debug +``` + ## Code of Conduct This project adheres to the Contributor Covenant [code of conduct](https://realm.io/conduct/).