From 4bb418bfafb3e04439e88022d3e5091fc8f8e6c0 Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil Date: Mon, 11 Sep 2017 01:15:47 +0700 Subject: [PATCH 1/3] use cp instead of npm link --- tasks/e2e-kitchensink.sh | 14 +++++++------- tasks/e2e-simple.sh | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 10bdc077931..834cde5f2af 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -164,10 +164,10 @@ npm install test-integrity@^2.0.1 cd "$temp_app_path/test-kitchensink" # Link to our preset -npm link "$root_path"/packages/babel-preset-react-app +cp -r "$root_path"/packages/babel-preset-react-app node_modules # Link to test module -npm link "$temp_module_path/node_modules/test-integrity" +cp -r "$temp_module_path/node_modules/test-integrity" node_modules # Test the build REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ @@ -225,13 +225,13 @@ npm unlink "$root_path"/packages/babel-preset-react-app echo yes | npm run eject # ...but still link to the local packages -npm link "$root_path"/packages/babel-preset-react-app -npm link "$root_path"/packages/eslint-config-react-app -npm link "$root_path"/packages/react-dev-utils -npm link "$root_path"/packages/react-scripts +cp -r "$root_path"/packages/babel-preset-react-app node_modules +cp -r "$root_path"/packages/eslint-config-react-app node_modules +cp -r "$root_path"/packages/react-dev-utils node_modules +cp -r "$root_path"/packages/react-scripts node_modules # Link to test module -npm link "$temp_module_path/node_modules/test-integrity" +cp -r "$temp_module_path/node_modules/test-integrity" node_modules # Test the build REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index 84d095e9496..f04e29a5bb3 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -309,10 +309,10 @@ verify_module_scope echo yes | npm run eject # ...but still link to the local packages -npm link "$root_path"/packages/babel-preset-react-app -npm link "$root_path"/packages/eslint-config-react-app -npm link "$root_path"/packages/react-dev-utils -npm link "$root_path"/packages/react-scripts +cp -r "$root_path"/packages/babel-preset-react-app node_modules +cp -r "$root_path"/packages/eslint-config-react-app node_modules +cp -r "$root_path"/packages/react-dev-utils node_modules +cp -r "$root_path"/packages/react-scripts node_modules # Test the build npm run build From 7d5f685f79fc0816cc617d639bbd98626e19e079 Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil Date: Mon, 11 Sep 2017 01:45:09 +0700 Subject: [PATCH 2/3] preserve the test for linked test-integrity --- tasks/e2e-kitchensink.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 834cde5f2af..dbf75b4166a 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -167,7 +167,7 @@ cd "$temp_app_path/test-kitchensink" cp -r "$root_path"/packages/babel-preset-react-app node_modules # Link to test module -cp -r "$temp_module_path/node_modules/test-integrity" node_modules +npm link "$temp_module_path/node_modules/test-integrity" # Test the build REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ @@ -231,7 +231,7 @@ cp -r "$root_path"/packages/react-dev-utils node_modules cp -r "$root_path"/packages/react-scripts node_modules # Link to test module -cp -r "$temp_module_path/node_modules/test-integrity" node_modules +npm link "$temp_module_path/node_modules/test-integrity" # Test the build REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ From 38d974d68ac4f602c999707deea1658f171ecc6d Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil Date: Mon, 11 Sep 2017 02:12:21 +0700 Subject: [PATCH 3/3] remove usage of unlink --- tasks/e2e-kitchensink.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index dbf75b4166a..086c070ec55 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -219,7 +219,7 @@ E2E_FILE=./build/index.html \ # ****************************************************************************** # Unlink our preset -npm unlink "$root_path"/packages/babel-preset-react-app +rm -rf node_modules/packages/babel-preset-react-app # Eject... echo yes | npm run eject