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

Chore: Refactor use require.resolve() for archetype discovery. #32

Closed
ryan-roemer opened this issue Nov 25, 2015 · 0 comments
Closed

Chore: Refactor use require.resolve() for archetype discovery. #32

ryan-roemer opened this issue Nov 25, 2015 · 0 comments

Comments

@ryan-roemer
Copy link
Member

Use:

  try {
    // Require resolve it
    var modPath = require.resolve(name);
    pkgPath = path.join(modPath, "package.json");
    return require(pkgPath);
  } catch (err) {
    /*eslint-disable no-empty*/
  }

Which has problems identified by @exogen in #31 (comment)

Task:

  • Fix the problems
  • Re-add a similar snippet
  • Move up the inference chain if possible.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant