Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting cmd for npm:cmd in any other way than command line arg? #15

Open
holden-caulfield opened this issue May 11, 2016 · 1 comment
Open

Comments

@holden-caulfield
Copy link

I'm using shipit-npm as part of my overall build/deploy strategy, and for some workflows besides just doing the regular npm install it would be good for me to leverage the npm:cmd task to run some other npm scripts I have.

For example, after npm install it would be great for me to run a "build" script I have defined on my package section.

So my shipitfile would have a sniped like this

shipit.on('npm_installed', function() { shipit.start('npm:cmd') });

Problem here is that I don't have any way to pass which script to run. Only way I can do it is with a parameter on the command line itsel, something like

shipit staging deploy --cmd 'run build

Which works, but is a bit obscure for somebody else to read and understand what it does.

It would be great if this could be passed as a config option or something. Maybe an option on the npm config at shipit?

Let me know if there is a way to achieve what I'm looking for, or if you want I can try doing a quick PR to add the ability to pass cmd as a config option

@ghost
Copy link

ghost commented Nov 27, 2016

Any plan to merge this fix ? very useful indeed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant