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

Should all global bins use local versions by default #2498

Closed
guybedford opened this issue Sep 25, 2019 · 1 comment
Closed

Should all global bins use local versions by default #2498

guybedford opened this issue Sep 25, 2019 · 1 comment

Comments

@guybedford
Copy link
Member

Currently jspm install -g mocha would create a global mocha bin in /path/to/global/jspm_packages/.bin/mocha.

The idea is that this global /path/to/global/jspm_packages/.bin can be added to the PATH to get global bins support.

When using that mocha command, a very common scenario is wanting to ensure you are using the right version of the mocha command locally.

The suggestion is this - what if we make all global commands check the local project (process cwd), for a local version of that same command and then use that if it is available?

This seems a very useful property to have for global command installs.

The downside is opting out of the behaviour if you don't want it but jspm bin -g mocha can remain an alias to the global version specifically providing an opt-out path too.

jspm itself would certainly take advantage of this feature.

@guybedford
Copy link
Member Author

Implemented in #2496.

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

No branches or pull requests

1 participant