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

Fix package resolution when DocumentJS is run globally #279

Merged
merged 1 commit into from
Sep 7, 2017

Conversation

chasenlehara
Copy link
Member

Previously, when DocumentJS was installed globally and run, it wouldn’t be able to find packages in the project where the user was running the command.

This adds a fallback to using resolve’s implementation of Node’s algorithm in the user’s current working directory.

I tested this by installing this fixed version globally and running the global command in a project that wasn’t working before. I would appreciate some help figuring out how I should write a test for this case!

Fixes #275

Previously, when DocumentJS was installed globally and run, it wouldn’t be able to find packages in the project where the user was running the command.

This adds a fallback to using [resolve](https://www.npmjs.com/package/resolve)’s implementation of Node’s algorithm in the user’s current working directory.

Fixes #275
@matthewp
Copy link
Contributor

matthewp commented Sep 7, 2017

I think a test would be too hard in this case and not worth the trouble.

Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chasenlehara chasenlehara merged commit de8d0dd into master Sep 7, 2017
@chasenlehara chasenlehara deleted the 275-global branch September 7, 2017 18:59
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

Successfully merging this pull request may close these issues.

Cannot generate documentation
2 participants