feat(create-medusa-app): improve by adding depth to clone commands (#10812)
Improve command by passing `--depth 1` to decrease download size + improve for slow speed. Closes TRI-742
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"create-medusa-app": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
feat(create-medusa-app): improve by adding depth to clone commands
|
||||||
@@ -23,7 +23,7 @@ export default async function cloneRepo({
|
|||||||
}: CloneRepoOptions) {
|
}: CloneRepoOptions) {
|
||||||
await execute(
|
await execute(
|
||||||
[
|
[
|
||||||
`git clone ${repoUrl || DEFAULT_REPO} -b ${BRANCH} ${directoryName}`,
|
`git clone ${repoUrl || DEFAULT_REPO} -b ${BRANCH} ${directoryName} --depth 1`,
|
||||||
{
|
{
|
||||||
signal: abortController?.signal,
|
signal: abortController?.signal,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ const execute = async (
|
|||||||
childProcess.signal &&
|
childProcess.signal &&
|
||||||
["SIGINT", "SIGTERM"].includes(childProcess.signal)
|
["SIGINT", "SIGTERM"].includes(childProcess.signal)
|
||||||
) {
|
) {
|
||||||
console.log("abortingggg")
|
|
||||||
throw getAbortError()
|
throw getAbortError()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,10 +60,9 @@ export async function installNextjsStarter({
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// TODO change back to use create-next-app once Next.js v2 changes land on the main branch
|
|
||||||
await execute(
|
await execute(
|
||||||
[
|
[
|
||||||
`git clone ${NEXTJS_REPO} -b ${NEXTJS_BRANCH} ${nextjsDirectory}`,
|
`git clone ${NEXTJS_REPO} -b ${NEXTJS_BRANCH} ${nextjsDirectory} --depth 1`,
|
||||||
{
|
{
|
||||||
signal: abortController?.signal,
|
signal: abortController?.signal,
|
||||||
env: process.env,
|
env: process.env,
|
||||||
|
|||||||
Reference in New Issue
Block a user