I am using angular seed project as a skeleton for my angularjs app. The package.json contains two scripts-
prestartandpretest
Both run npm install when I run the server with the npm start command.
I don't want to install packages whenever I start the server. However, if I want to update my dependencies, then I can use update-deps.
Are these scripts mandatory to use, or we can omit them? Will they have any consequences if I remove them? If yes, then what?
If you are running
npm installmanually and nothing is removing/modifyingnode_modulesorpackage*.jsonin the lifecycle, then thosepretestandprestartscripts (that donpm installand nothing else) can be omitted.If you are 100% sure that you do not want or need lifecycle scripts like
prestart/poststartandpretest/posttestbut don't want to modify thepackage.jsonfor any reason, you can use--ignore-scripts:It seems that those lifecycle scripts are there just as a convenience for those who run
npm startornpm testwithout runningnpm installfirst. They can be safely removed.