Why do my npm command-line arguments disappear?
Or how to pass arguments down.
Have you ever had to pass in arguments “down” to the inner npm script and dash-dash-ed them? And then maybe you had a double or triple nest i.e. one npm command calling another that in turn calls another and so on.
While this works there are a few drawbacks:
- I need to know exactly how many commands are nested and which one I want to pass command-line arguments
- I need to type more
So here’s my approach to this:
Leave the nesting commands with an ending --
so command-line call would not need to add multiple dash-dash but only one: