Skip to content

Commit

Permalink
make it work without passing the generate argument
Browse files Browse the repository at this point in the history
  • Loading branch information
julianbenegas committed Apr 16, 2023
1 parent 3b6440a commit d6b790d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/nextjs-shopify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build:analyze": "cross-env ANALYZE=true yarn build",
"start": "next start",
"lint": "next lint",
"generate": "yarn sdk-gen generate --dir src/storefront/sdk-gen"
"generate": "yarn sdk-gen --dir src/storefront/sdk-gen"
},
"dependencies": {
"@bsmnt/drop": "*",
Expand Down
8 changes: 4 additions & 4 deletions packages/sdk-gen/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ function help(code: number) {
}

// Get CLI arguments
const [, , cmd] = process.argv
if (!cmd) {
help(0)
throw new Error('Unreachable')
let [, , cmd] = process.argv

if (!cmd || cmd.startsWith('-')) {
cmd = 'generate'
}

const args = arg(
Expand Down

1 comment on commit d6b790d

@vercel
Copy link

@vercel vercel bot commented on d6b790d Apr 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

commerce-toolkit-nextjs-shopify – ./examples/nextjs-shopify

commerce-toolkit-nextjs-shopify.vercel.app
commerce-toolkit-nextjs-shopify-git-main-basement.vercel.app
commerce-toolkit-nextjs-shopify-basement.vercel.app

Please sign in to comment.