Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Allow to run additional commands in the recipe installer #632

Merged
merged 4 commits into from
Jan 6, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions app/pages/docs/writing-recipes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,26 @@ builder.addTransformFilesStep({
})
```

### Running an external command (#running-an-external-command)
beerose marked this conversation as resolved.
Show resolved Hide resolved

In case you have a recipe which should run an external command like
`blitz prisma generate`, you can use `addRunCommandStep`.

beerose marked this conversation as resolved.
Show resolved Hide resolved
```ts
builder.addRunCommandStep({
stepId: "runCommand",
stepName: "Generate prisma client",
explanation:
"Since we added a new generator to the prisma schema, we have to update the prisma client",
command: "blitz prisma generate",
})
```

<Card type="info">
We have suppressed the command output, so the user will not see the
result of the executed command.
</Card>

### Publishing {#publishing}

That's all you need to build a recipe! At this point, you can commit and
Expand Down