@@ -61,23 +61,33 @@ clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'`
61
61
# Copy some of the react-scripts project files to the temporary folder.
62
62
# Exclude folders that definitely won’t be part of the package from processing.
63
63
# We will strip the dev-only code there, `npm pack`, and copy the package back.
64
- cd $root_path /packages/react-scripts
64
+ cd $root_path
65
65
rsync -av --exclude=' .git' --exclude=$clean_path \
66
66
--exclude=' node_modules' --exclude=' build' \
67
67
' ./' $clean_path > /dev/null
68
68
69
69
# Open the clean folder
70
- cd $clean_path
70
+ cd $clean_path /packages/react-scripts
71
+
71
72
# Now remove all the code relevant to development of Create React App.
72
73
files=" $( find -L . -name " *.js" -type f) "
73
74
for file in $files ; do
74
75
sed -i.bak ' /\/\/ @remove-on-publish-begin/,/\/\/ @remove-on-publish-end/d' $file
75
76
rm $file .bak
76
77
done
77
78
79
+ # Install all our packages
80
+ cd $clean_path
81
+ $root_path /node_modules/.bin/lerna bootstrap
82
+
83
+ cd $clean_path /packages/react-scripts
84
+
85
+ # Like bundle-deps, this script modifies packages/react-scripts/package.json,
86
+ # copying own dependencies (those in the `packages` dir) to bundledDependencies
87
+ node $clean_path /tasks/bundle-own-deps.js
88
+
78
89
# Finally, pack react-scripts
79
- cp -rf $root_path /packages/react-scripts/node_modules $clean_path
80
- scripts_path=$clean_path /` npm pack`
90
+ scripts_path=$clean_path /packages/react-scripts/` npm pack`
81
91
82
92
# ******************************************************************************
83
93
# Now that we have packed them, call the global CLI.
0 commit comments