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

Pass namespace for helper.registerDependencies #17

Closed
lijunle opened this issue Jul 22, 2016 · 7 comments
Closed

Pass namespace for helper.registerDependencies #17

lijunle opened this issue Jul 22, 2016 · 7 comments

Comments

@lijunle
Copy link

lijunle commented Jul 22, 2016

In helper.registerDependencies, there are two ways to register generator dependency.

  1. Pass generator class. However, in this case, there is no way to specify the namespace.
  2. Pass the generator path. However, the Environment.prototype.namespace is not smart enough to auto detect my namespace because I am writing generator in scope package. My main generator reports the composing generator is not found.
@SBoudrias
Copy link
Member

FWIW If you're using {local: path} in your composeWith, registerDependencies is useless.

@lijunle
Copy link
Author

lijunle commented Jul 22, 2016

I am not using {local:path}.

@SBoudrias
Copy link
Member

@lijunle can you paste your code. It'll help when trying to figure out what is the issue/bug you're running into.

@addyosmani
Copy link
Member

@lijunle It's been a while since the last ping on this issue. Should we assume you aren't able to share your code / close this or do you think you'll have a chance to get that together?

@lijunle
Copy link
Author

lijunle commented Sep 22, 2016

Sorry, Currently, I am using such a hack to resolve it:

helpers.registerDependencies = function (env, dependencies) {
  dependencies.forEach(function (dependency) {
    env.register.apply(env, dependency);
  });
};

@guilhermevrs
Copy link

I was facing the exact same problem. Locally, yeoman-enviroment was working correctly and retrieving the correct namespace for the specific path.

But while running on jenkins for CI, the generator was not found.

What I did is to require the specific generator class and registered under the correct namespace

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2020

This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days

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

5 participants