Skip to content

Fix the e2e test #699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions tasks/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,32 @@ clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'`
# 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/packages/react-scripts
cd $root_path
rsync -av --exclude='.git' --exclude=$clean_path\
--exclude='node_modules' --exclude='build'\
'./' $clean_path >/dev/null

# Open the clean folder
cd $clean_path
cd $clean_path/packages/react-scripts

# Now remove all the code relevant to development of Create React App.
files="$(find -L . -name "*.js" -type f)"
for file in $files; do
sed -i.bak '/\/\/ @remove-on-publish-begin/,/\/\/ @remove-on-publish-end/d' $file
rm $file.bak
done

# Install all our packages
cd $clean_path
$root_path/node_modules/.bin/lerna bootstrap

cd $clean_path/packages/react-scripts

# This modifies package.json to copy all dependencies to bundledDependencies
node ./node_modules/.bin/bundle-deps

# Finally, pack react-scripts
npm install
scripts_path=$clean_path/`npm pack`
scripts_path=$clean_path/packages/react-scripts/`npm pack`

# ******************************************************************************
# Now that we have packed them, create a clean app folder and install them.
Expand Down