nodeshift-archived/centos7-s2i-nodejs

Investigate a better way to run npm build

lholmquist opened this issue · 1 comments

So i noticed that we are always installing all dependecies, then pruning the dev ones at the end. This is because we are running npm build --if-present and if there is an build script, it would fail without dev deps.

Is there a better way to do this instead of installing the dev dependencies, then deleting them. That way is fine if there is a build script, but the cases where there isn't, i feel like it takes a lot more time to build the container.

Really, i think all we need to do is look at the package.json and see if there is a "build" script, and we can probably use jq, https://stedolan.github.io/jq/, for that.

closed via 0b97088