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

Create scripts for all binary commands (generate, generateAction, etc) #181

Closed
evantahler opened this issue Jun 17, 2013 · 6 comments
Closed

Comments

@evantahler
Copy link
Member

Once we do this, we can update the install instructions to be npm run-script actionHero generate which is a little cleaner

@evantahler
Copy link
Member Author

Might not be possible until this: https://github.com/isaacs/npm/issues/3494
Alternatively, we can suggest to users that they do a global npm install -g install. This is what Sails does.

@evantahler
Copy link
Member Author

work is here, pending we figure out how arg passing will work

https://github.com/evantahler/actionHero/compare/bin_to_script

@NicolasRitouet
Copy link

Is there a reason why you don't advise to install actionhero globally ?
That's OS proof, shorter in the tutorials and you need to do it once.
I was surprised to see that when I discovered Actionhero, because all the other frameworks propose that, but maybe you have a good reason :)

@evantahler
Copy link
Member Author

There's nothing wrong from it from an operations POV (IE: it works), but I suggest that new folks keep all packages locally for a few reasons:

  • clarity on which version you have
  • clarity in which binaries you are running
  • ability to inspect source from within project
  • clearer debugging when wrappers (cron, deployment tools, forever, etc) can't find binary (usually something to do with ENV or shell)

@jacobfike
Copy link

Things like mocha recommend installing globally to get the cli commands, and also installing locally to control the version used by your project. It should be possible to detect what directory the executable is in vs. the current working directory and then call the locally installed actionhero generator, passing it the arguments given to the global one.

That would give you the best of both worlds. All the convenience of system-wide cli commands, but you don't have to worry about version mismatches.

@evantahler
Copy link
Member Author

ahh! That`s a good idea. Please submit a PR!

As a note, I think that the binary global/local passthrough is a good idea, but not really related to this issue.

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

3 participants