Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
7c978e54
Commit
7c978e54
authored
8 years ago
by
Ville Immonen
Committed by
Dan Abramov
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Use bundled local packages in the end-to-end flow (#721)
Fixes
#718
.
parent
fbccb820
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks/cra.sh
+14
-4
tasks/cra.sh
with
14 additions
and
4 deletions
+14
-4
tasks/cra.sh
+
14
-
4
View file @
7c978e54
...
@@ -61,13 +61,14 @@ clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'`
...
@@ -61,13 +61,14 @@ clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'`
# Copy some of the react-scripts 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.
# 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.
# 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
\
rsync
-av
--exclude
=
'.git'
--exclude
=
$clean_path
\
--exclude
=
'node_modules'
--exclude
=
'build'
\
--exclude
=
'node_modules'
--exclude
=
'build'
\
'./'
$clean_path
>
/dev/null
'./'
$clean_path
>
/dev/null
# Open the clean folder
# 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.
# Now remove all the code relevant to development of Create React App.
files
=
"
$(
find
-L
.
-name
"*.js"
-type
f
)
"
files
=
"
$(
find
-L
.
-name
"*.js"
-type
f
)
"
for
file
in
$files
;
do
for
file
in
$files
;
do
...
@@ -75,9 +76,18 @@ for file in $files; do
...
@@ -75,9 +76,18 @@ for file in $files; do
rm
$file
.bak
rm
$file
.bak
done
done
# Install all our packages
cd
$clean_path
$root_path
/node_modules/.bin/lerna bootstrap
cd
$clean_path
/packages/react-scripts
# Like bundle-deps, this script modifies packages/react-scripts/package.json,
# copying own dependencies (those in the `packages` dir) to bundledDependencies
node
$clean_path
/tasks/bundle-own-deps.js
# Finally, pack react-scripts
# Finally, pack react-scripts
cp
-rf
$root_path
/packages/react-scripts/node_modules
$clean_path
scripts_path
=
$clean_path
/packages/react-scripts/
`
npm pack
`
scripts_path
=
$clean_path
/
`
npm pack
`
# ******************************************************************************
# ******************************************************************************
# Now that we have packed them, call the global CLI.
# Now that we have packed them, call the global CLI.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment