R
R
Rafis Bagautdinov2017-07-18 10:00:19
npm
Rafis Bagautdinov, 2017-07-18 10:00:19

What could be wrong with npm script?

Good afternoon.
Installed the Pug package for NPM. When the command is called,
pug templates/*.pug -w -P --out ./
everything works. Here is a screenshot:
499ea163a7c84908aa34b0cb0877826b.png
However, I added a script to the package.json file with the same command, it gives an error.

"scripts": {
    "start": "npm run pug && npm run gulp:watch",
    "pug": "pug templates/*.pug -w -P --out ./",
    "gulp:watch": "gulp watch"
  },

The error is this:
c8e63891df094b49944560708e882f42.png
But it all works if you specify index.pug instead of *.pug: Tell me
dea33dbf7d4b4f7090908f333f906704.png
, what could be the matter? Why doesn't it work with asterisk in npm scripts?
PS I configured everything in gulp, the task is being performed, but for a general understanding, I will still be happy with the answer

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question