From 421d7a947f4f7e856ca09557494c75802b2a82ee Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 24 Feb 2020 17:30:11 +0000 Subject: [PATCH] Tools: Added back RN bundler command and cleaned up files --- BUILD.md | 6 ++++-- ReactNativeClient/build_android.bat | 2 -- ReactNativeClient/build_android_prod.bat | 9 --------- ReactNativeClient/clean_build.bat | 2 +- ReactNativeClient/debug_log.bat | 1 - ReactNativeClient/debug_log.sh | 2 -- ReactNativeClient/ios/build-ios.sh | 2 -- ReactNativeClient/package.json | 1 + ReactNativeClient/run_ios.sh | 1 - ReactNativeClient/start_server.bat | 2 -- ReactNativeClient/start_server.sh | 2 -- Tools/git-hooks/pre-commit-sh | 13 ------------- joplin.sublime-project | 8 ++++++-- 13 files changed, 12 insertions(+), 39 deletions(-) delete mode 100644 ReactNativeClient/build_android.bat delete mode 100644 ReactNativeClient/build_android_prod.bat delete mode 100644 ReactNativeClient/debug_log.bat delete mode 100755 ReactNativeClient/debug_log.sh delete mode 100755 ReactNativeClient/ios/build-ios.sh delete mode 100755 ReactNativeClient/run_ios.sh delete mode 100644 ReactNativeClient/start_server.bat delete mode 100755 ReactNativeClient/start_server.sh delete mode 100644 Tools/git-hooks/pre-commit-sh diff --git a/BUILD.md b/BUILD.md index e898753f8..a2a108690 100644 --- a/BUILD.md +++ b/BUILD.md @@ -47,11 +47,13 @@ First you need to setup React Native to build projects with native code. For thi Then: cd ReactNativeClient - react-native run-ios - # Or: react-native run-android + npm run start-android + # Or: npm run start-ios To run the iOS application, it might be easier to open the file `ios/Joplin.xcworkspace` on XCode and run the app from there. +Normally the bundler should start automatically with the application. If it doesn't run `npm run start`. + ## Building the clipper cd Clipper/popup diff --git a/ReactNativeClient/build_android.bat b/ReactNativeClient/build_android.bat deleted file mode 100644 index 71c155ca3..000000000 --- a/ReactNativeClient/build_android.bat +++ /dev/null @@ -1,2 +0,0 @@ -cd android -gradlew.bat installDebug --console plain \ No newline at end of file diff --git a/ReactNativeClient/build_android_prod.bat b/ReactNativeClient/build_android_prod.bat deleted file mode 100644 index e8e04e39d..000000000 --- a/ReactNativeClient/build_android_prod.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off - -rem Clear build dir if permission issue: -rem rmdir /S/Q android\app\build - -setlocal -node ..\Tools\prepare-android-prod-build.js -cd android -gradlew.bat assembleRelease -PbuildDir=build --console plain \ No newline at end of file diff --git a/ReactNativeClient/clean_build.bat b/ReactNativeClient/clean_build.bat index 6e84491c3..512db591c 100644 --- a/ReactNativeClient/clean_build.bat +++ b/ReactNativeClient/clean_build.bat @@ -4,4 +4,4 @@ rmdir /s/q android\build rmdir /s/q android\.gradle rmdir /s/q node_modules npm install -start_server.bat \ No newline at end of file +npm run start \ No newline at end of file diff --git a/ReactNativeClient/debug_log.bat b/ReactNativeClient/debug_log.bat deleted file mode 100644 index 65fcefe2d..000000000 --- a/ReactNativeClient/debug_log.bat +++ /dev/null @@ -1 +0,0 @@ -adb logcat *:S ReactNative:V ReactNativeJS:V \ No newline at end of file diff --git a/ReactNativeClient/debug_log.sh b/ReactNativeClient/debug_log.sh deleted file mode 100755 index 7ab2f2c52..000000000 --- a/ReactNativeClient/debug_log.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -adb logcat *:S ReactNative:V ReactNativeJS:V \ No newline at end of file diff --git a/ReactNativeClient/ios/build-ios.sh b/ReactNativeClient/ios/build-ios.sh deleted file mode 100755 index a6771bfc6..000000000 --- a/ReactNativeClient/ios/build-ios.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -xcodebuild -project Joplin.xcodeproj -configuration Release -scheme Joplin -destination id=3AF6C788-B6ED-41DD-85F0-32D719DB0DBE -derivedDataPath build diff --git a/ReactNativeClient/package.json b/ReactNativeClient/package.json index aba552be8..d3fea9040 100644 --- a/ReactNativeClient/package.json +++ b/ReactNativeClient/package.json @@ -5,6 +5,7 @@ "version": "0.8.0", "private": true, "scripts": { + "start": "node node_modules/react-native/local-cli/cli.js start --reset-cache", "start-ios": "react-native run-ios", "start-android": "react-native run-android", "postinstall": "jetify && npm run build", diff --git a/ReactNativeClient/run_ios.sh b/ReactNativeClient/run_ios.sh deleted file mode 100755 index ad4d3d53f..000000000 --- a/ReactNativeClient/run_ios.sh +++ /dev/null @@ -1 +0,0 @@ -react-native run-ios --simulator 'iPhone 6' \ No newline at end of file diff --git a/ReactNativeClient/start_server.bat b/ReactNativeClient/start_server.bat deleted file mode 100644 index d84e1d40e..000000000 --- a/ReactNativeClient/start_server.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -npm start -- --reset-cache \ No newline at end of file diff --git a/ReactNativeClient/start_server.sh b/ReactNativeClient/start_server.sh deleted file mode 100755 index 9bb7333d0..000000000 --- a/ReactNativeClient/start_server.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -npm start -- --reset-cache \ No newline at end of file diff --git a/Tools/git-hooks/pre-commit-sh b/Tools/git-hooks/pre-commit-sh deleted file mode 100644 index ac1bf7284..000000000 --- a/Tools/git-hooks/pre-commit-sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -# In pre-commit, PWD is set to the root of the repo -# https://longair.net/blog/2011/04/09/missing-git-hooks-documentation/ -ROOT_DIR="$PWD" - -# If any README file has been changed, update the website -git status -s | grep ' README\| readme\| build-website.js' > /dev/null 2>&1 -readmeStatus=$? -if [ $readmeStatus -eq 0 ]; then - node "$ROOT_DIR/Tools/build-website.js" - git add docs -fi \ No newline at end of file diff --git a/joplin.sublime-project b/joplin.sublime-project index ba3ad67d8..553f48003 100644 --- a/joplin.sublime-project +++ b/joplin.sublime-project @@ -34,7 +34,9 @@ "ElectronClient/gui/ResourceScreen.js", "ElectronClient/gui/ShareNoteDialog.js", "ElectronClient/gui/TinyMCE.js", - "ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js" + "ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js", + "ReactNativeClient/setUpQuickActions.js", + "ReactNativeClient/android/app/joplin.keystore" ], "folder_exclude_patterns": [ @@ -74,7 +76,9 @@ "Clipper/dist", "ReactNativeClient/lib/rnInjectedJs", "ReactNativeClient/ios/Pods", - "CliClient/locales-build" + "CliClient/locales-build", + "ReactNativeClient/lib/vendor", + "ReactNativeClient/ios/Joplin-tvOS" ], "path": "." }