Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Add check for local version for global install #26

Closed
wants to merge 1 commit into from

Conversation

curiouslychase
Copy link

This PR adds the following:

  • Adds a check for local version so that when the package is global it opts for the local version instead.
  • Moves the bin/builder.js logic to /builder.js.
  • Adds an export of index.js

Testing

  • npm linked my working directory of builder and installed a version of builder from npm install and confirmed that it was using the local version.
  • Removed the local version and confirmed that it was using the global version

Relates to #10 cc @ryan-roemer @exogen

@ryan-roemer
Copy link
Member

@chaseadamsio -- I'm not sure this is going to work in light of #27 and #25

});
// Try to resolve builder in the current project's root, use global if fails
try {
localBuilder = resolve.sync(
Copy link
Member

Choose a reason for hiding this comment

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

What does resolve.sync offer over require.resolve? Ideally we don't add a new dependency...

@ryan-roemer ryan-roemer deleted the feature-checkForLocalVersion branch August 30, 2016 18:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants