Make root folder less busy
- Move `mobile_files` into `mobile/js_files` - Move `desktop_files` into `desktop/js_files` Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
parent
8209bf260c
commit
e3e8e218ad
|
@ -25,7 +25,6 @@
|
|||
/components @status-im/status-core-ui
|
||||
|
||||
desktop/ @vkjr
|
||||
/desktop_files @vkjr
|
||||
modules/react-native-desktop*/ @vkjr
|
||||
modules/react-native-desktop*/ @vkjr
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ fastlane/README.md
|
|||
# emacs
|
||||
.dir-locals.el
|
||||
|
||||
#ignore platform-specific files in the root since they are only symlinks to files in folders 'desktop_files' and 'mobile_files'
|
||||
#ignore platform-specific files in the root since they are only symlinks to files in folders 'desktop/js_files' and 'mobile/js_files'
|
||||
/package-lock.json
|
||||
/package.json
|
||||
/metro.config.js
|
||||
|
|
|
@ -14,9 +14,9 @@ let
|
|||
react-native-deps = callPackage ./maven/reactnative-android-native-deps.nix { inherit stdenvNoCC; };
|
||||
|
||||
createMobileFilesSymlinks = root: ''
|
||||
ln -sf ${root}/mobile_files/package.json ${root}/package.json
|
||||
ln -sf ${root}/mobile_files/metro.config.js ${root}/metro.config.js
|
||||
ln -sf ${root}/mobile_files/yarn.lock ${root}/yarn.lock
|
||||
ln -sf ${root}/mobile/js_files/package.json ${root}/package.json
|
||||
ln -sf ${root}/mobile/js_files/metro.config.js ${root}/metro.config.js
|
||||
ln -sf ${root}/mobile/js_files/yarn.lock ${root}/yarn.lock
|
||||
'';
|
||||
|
||||
# fake build to pre-download deps into fixed-output derivation
|
||||
|
@ -30,7 +30,7 @@ let
|
|||
stdenv.mkDerivation {
|
||||
name = "patched-android-gradle-and-npm-modules";
|
||||
src =
|
||||
let path = ./../../../..; # Import the root /android and /mobile_files folders clean of any build artifacts
|
||||
let path = ./../../../..; # Import the root /android and /mobile/js_files folders clean of any build artifacts
|
||||
in builtins.path { # We use builtins.path so that we can name the resulting derivation, otherwise the name would be taken from the checkout directory, which is outside of our control
|
||||
inherit path;
|
||||
name = "status-react-source-gradle-install";
|
||||
|
@ -38,7 +38,7 @@ let
|
|||
# Keep this filter as restrictive as possible in order to avoid unnecessary rebuilds and limit closure size
|
||||
mkFilter {
|
||||
dirRootsToInclude = [
|
||||
"android" "mobile_files" "resources"
|
||||
"android" "mobile/js_files" "resources"
|
||||
"translations" "status-modules"
|
||||
];
|
||||
dirsToExclude = [ ".git" ".svn" "CVS" ".hg" ".gradle" "build" "intermediates" "libs" "obj" ];
|
||||
|
|
|
@ -39,7 +39,7 @@ in stdenv.mkDerivation {
|
|||
# Keep this filter as restrictive as possible in order to avoid unnecessary rebuilds and limit closure size
|
||||
mkFilter {
|
||||
dirRootsToInclude = [
|
||||
"mobile_files"
|
||||
"mobile/js_files"
|
||||
"modules/react-native-status/android"
|
||||
"resources"
|
||||
];
|
||||
|
|
|
@ -7,9 +7,9 @@ let
|
|||
|
||||
createMobileFilesSymlinks = root: ''
|
||||
# Set up symlinks to mobile enviroment in project root
|
||||
ln -sf ${root}/mobile_files/package.json ${root}/package.json
|
||||
ln -sf ${root}/mobile_files/metro.config.js ${root}/metro.config.js
|
||||
ln -sf ${root}/mobile_files/yarn.lock ${root}/yarn.lock
|
||||
ln -sf ${root}/mobile/js_files/package.json ${root}/package.json
|
||||
ln -sf ${root}/mobile/js_files/metro.config.js ${root}/metro.config.js
|
||||
ln -sf ${root}/mobile/js_files/yarn.lock ${root}/yarn.lock
|
||||
'';
|
||||
|
||||
src =
|
||||
|
@ -20,7 +20,7 @@ let
|
|||
filter =
|
||||
# Keep this filter as restrictive as possible in order to avoid unnecessary rebuilds and limit closure size
|
||||
mkFilter {
|
||||
dirRootsToInclude = [ "mobile_files" ];
|
||||
dirRootsToInclude = [ "mobile/js_files" ];
|
||||
dirsToExclude = [ ".git" ".svn" "CVS" ".hg" ];
|
||||
filesToInclude = [ ".babelrc" ];
|
||||
root = path;
|
||||
|
|
|
@ -8,8 +8,8 @@ let
|
|||
rev = "3cc020e384ce2a439813adb7a0cc772a034d90bb";
|
||||
sha256 = "0h2kzdfiw43rbiiffpqq9lkhvdv8mgzz2w29pzrxgv8d39x67vr9";
|
||||
}) { inherit pkgs nodejs yarn; };
|
||||
yarnLock = ../../mobile_files/yarn.lock;
|
||||
packageJSON = ../../mobile_files/package.json;
|
||||
yarnLock = ../../mobile/js_files/yarn.lock;
|
||||
packageJSON = ../../mobile/js_files/package.json;
|
||||
packageJSONContent = importJSON packageJSON;
|
||||
|
||||
# Create a yarn package for our project that contains all the dependecies, so that we have a
|
||||
|
|
|
@ -2,6 +2,6 @@ const blacklist = require('metro').createBlacklist;
|
|||
|
||||
module.exports = {
|
||||
getBlacklistRE: function() {
|
||||
return blacklist([/desktop_files\/.*/]);
|
||||
return blacklist([/desktop\/js_files\/.*/]);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -114,7 +114,7 @@ function buildJSBundle() {
|
|||
function compile() {
|
||||
# Temporarily add path to javascript bundle to package.json
|
||||
local jsBundleLine="\"desktopJSBundlePath\": \"$JS_BUNDLE_PATH\""
|
||||
local jsPackagePath=$(joinExistingPath "$STATUS_REACT_HOME" 'desktop_files/package.json')
|
||||
local jsPackagePath=$(joinExistingPath "$STATUS_REACT_HOME" 'desktop/js_files/package.json')
|
||||
local tmp=$(mktemp)
|
||||
jq ".=(. + {$jsBundleLine})" "$jsPackagePath" > "$tmp" && mv "$tmp" "$jsPackagePath"
|
||||
echo -e "${YELLOW}Added 'desktopJSBundlePath' line to $jsPackagePath:${NC}"
|
||||
|
|
|
@ -14,7 +14,7 @@ RED='\033[0;31m'
|
|||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m'
|
||||
PLATFORM_FOLDER="desktop_files"
|
||||
PLATFORM_FOLDER="desktop/js_files"
|
||||
|
||||
$GIT_ROOT/scripts/run-environment-check.sh desktop
|
||||
|
||||
|
|
Loading…
Reference in New Issue