Calling `npm run build` directly instead of `node_modules/.bin/gatsby build`?
In .gitlab.ci
file, we have the following commands:
pages:
script:
- npm install
- npm install gatsby-cli
- node_modules/.bin/gatsby build --prefix-paths
In package.json
we also have a npm run
command for calling the build of Gatsby.
Is there a reason for not using npm run build
directly in .gitlab.ci
? (or npm run build -- --prefix-paths
if mandatory)
Furthermore,
the npm install gatsby-cli
could be avoided by adding gatsby-cli
in (dev)Dependencies in package.json
. Wouldn't it be simplier ?