Skip to content

Commit

Permalink
fix: fix expected undefined output
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenOutman committed Feb 28, 2023
1 parent fb42180 commit 72ee451
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"vitest": "0.12.6"
},
"dependencies": {
"@clack/prompts": "^0.2.0",
"@clack/prompts": "^0.4.5",
"@netlify/framework-info": "^9.8.3",
"emphasize": "^6.0.0",
"execa": "^7.0.0",
Expand Down
22 changes: 9 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/promptForParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ export async function promptForParameters() {
}
}

const guessedPublicDirectory = await guessPublicDirectory()
const publicDirectory = await text({
message: "Your public directory",
placeholder: await guessPublicDirectory(),
placeholder: guessedPublicDirectory,
defaultValue: guessedPublicDirectory,
})

if (isCancel(publicDirectory)) {
Expand Down
7 changes: 5 additions & 2 deletions src/setupMSW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ export async function setupMSW(options: SetupMSWOptions) {
)

// Run msw init
if (options.integrationType === "browser") {
if (
options.integrationType === "browser" ||
options.integrationType === "both"
) {
await runAsyncWithSpinner(
`Executing ${pc.cyan(`msw init`)}...`,
`Executing ${pc.cyan(`msw init ${options.publicDirectory} --save`)}...`,
async () => {
await execa("npx", ["msw", "init", options.publicDirectory, "--save"])
},
Expand Down

0 comments on commit 72ee451

Please # to comment.