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

Why is this so much simpler than npm/npm#4058? #1

Open
domenic opened this issue Apr 21, 2014 · 2 comments
Open

Why is this so much simpler than npm/npm#4058? #1

domenic opened this issue Apr 21, 2014 · 2 comments

Comments

@domenic
Copy link

domenic commented Apr 21, 2014

The code in npm/npm#4058, of which I believe most of is extracted from npm as it exists today, seems a lot larger. Is this module just as capable? If so, can we use it in npm itself? :)

@timoxley
Copy link
Owner

Is this module just as capable?

This module is really just:

  1. set me up the correct npm $PATH
  2. exec shell command with $PATH set in the env

The 'heavy lifting' is done by https://github.com/timoxley/npm-path.

npm-run currently doesn't handle whatever nasty business is going on in there with the npm config environment, nor does it execute package.json scripts. Might be 1 or 2 additional modules to be made breaking that out. A big plus breaking these up finely is the functionality becomes a lot easier to wrangle into a test.

@timoxley
Copy link
Owner

I'd really like to see every npm command be a self-contained module. npm becomes just a container for integration.

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

2 participants