allegro/grunt-maven-plugin

npm-offline change the flow

Closed this issue · 4 comments

Im running npm-offline to do builds within a server with no network connectivity. When npm-offline is run it falls over because it runs npm install --ignore-scripts which requires network so the build fails. What i can i do to skip this step

Nothing at the moment, but i can make this phase optional. The only thing is - will your build still work?

Okay i see what you mean, im new too npm. But your right it won't help. Any suggestions for building offline as it's being built in a CI server

npm-offilne use case is to build your application when npm breaks (it was developed during npm registry outage, see article linked in documentation). If you need to build it offline, i think all you need to do is to package node_modules after performing full install (install && install scripts). This way the archive might get substantially bigger, but for most cases it should work.

It still might fail for PhantomJS, but i think you should experiment with your current configuration, as it is per-npm module case. If you get to the point where you can confirm that packaging node_modules after running full install works for you, i will add switch to disable calling npm install --ignore-scripts.

Thanks for the help. I will close out the ticket and give that go, I don't think the switch will be necessary now.