diff --git a/tasks/cra.sh b/tasks/cra.sh index 1fd60f6a221f479329e4fabbebf354466d363fb5..8328e55f19e9fff4645721672ec8e84e7e487b03 100755 --- a/tasks/cra.sh +++ b/tasks/cra.sh @@ -58,10 +58,10 @@ root_path=$PWD # Do not overwrite any files in the current folder. clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'` -# Copy some of the project files to the temporary folder. +# Copy some of the react-scripts project files to the temporary folder. # Exclude folders that definitely won’t be part of the package from processing. # We will strip the dev-only code there, `npm pack`, and copy the package back. -cd $root_path +cd $root_path/packages/react-scripts rsync -av --exclude='.git' --exclude=$clean_path\ --exclude='node_modules' --exclude='build'\ './' $clean_path >/dev/null @@ -76,7 +76,7 @@ for file in $files; do done # Finally, pack react-scripts -cp -rf $root_path/node_modules $clean_path +cp -rf $root_path/packages/react-scripts/node_modules $clean_path scripts_path=$clean_path/`npm pack` # ****************************************************************************** diff --git a/tasks/e2e.sh b/tasks/e2e.sh index 399896cfe77645633b96ca548d37c4e1c960368c..a32b792285c3d0495ea47294259b9d660e64aaee 100755 --- a/tasks/e2e.sh +++ b/tasks/e2e.sh @@ -85,7 +85,7 @@ npm start -- --smoke-test # ****************************************************************************** # Pack CLI (it doesn't need cleaning) -cd packages/create-react-app +cd $root_path/packages/create-react-app cli_path=$PWD/`npm pack` # Packing react-scripts takes more work because we want to clean it up first. @@ -93,10 +93,10 @@ cli_path=$PWD/`npm pack` # Do not overwrite any files in the current folder. clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'` -# Copy some of the project files to the temporary folder. +# Copy some of the react-scripts project files to the temporary folder. # Exclude folders that definitely won’t be part of the package from processing. # We will strip the dev-only code there, `npm pack`, and copy the package back. -cd $root_path +cd $root_path/packages/react-scripts rsync -av --exclude='.git' --exclude=$clean_path\ --exclude='node_modules' --exclude='build'\ './' $clean_path >/dev/null @@ -183,7 +183,7 @@ npm start -- --smoke-test # ****************************************************************************** -# Test --scripts-version is a version number +# Test --scripts-version with a version number # ****************************************************************************** cd $temp_app_path @@ -195,7 +195,7 @@ test -e node_modules/react-scripts grep '"version": "0.4.0"' node_modules/react-scripts/package.json # ****************************************************************************** -# Test --scripts-version is a tarball url +# Test --scripts-version with a tarball url # ****************************************************************************** cd $temp_app_path @@ -207,7 +207,7 @@ test -e node_modules/react-scripts grep '"version": "0.4.0"' node_modules/react-scripts/package.json # ****************************************************************************** -# Test --scripts-version is a custom fork of react-scripts +# Test --scripts-version with a custom fork of react-scripts # ****************************************************************************** cd $temp_app_path