Mike Godin
Mike Godin

Reputation: 3937

How to run `nuxt generate` in the foreground

In my package.json, I have:

...
"scripts": {
  "generate": "nuxt generate & npm run css",
...

And run the command via npm run generate, with only one issue -- it seems to run in the background, so if I run it in a bash script with additional commands following the generation, they actually run during the generation. Is there an option to make nuxt generate run in the foreground?

Upvotes: 0

Views: 388

Answers (1)

jumper85
jumper85

Reputation: 502

That‘s because you only have one & in script which means the command before will be sent to the background. Try using && between the commands.

Upvotes: 1

Related Questions