-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
update yeoman-environment to v4.0.0 #793
Conversation
What's the point of yeoman-environment release without this updated? Can yeoman-environment be used without yo? |
Yes it’s possible. Would be nice if someone could convert yo to ESM. |
@ntucker yes it's possible and I actually recommend. You can build your own, yeoman-environment has helpers for that. |
Oh that's cool. Is there much difference than yoe? I actually have my own cli that I just proxy calls to yo with https://github.com/ntucker/anansi/blob/master/packages/cli/run.mjs#L42 Would it be as simple as replacing yo with yoe to run a generator? |
@mshima I don't get how to use run [options] <namespace> <namespace> Run a generator What are namespaces? What happened to specifying the generator? With yo I do So where does [generator-filepath] go? |
Running
which associates with export const environmentAction = async function (generatorNamespace, options, command) {
debug('Handling operands %o', generatorNamespace);
if (!generatorNamespace) {
return;
}
const env = createEnv({ ...options, command: this });
this.env = env;
await env.lookupLocalPackages();
return env.execute(generatorNamespace, command.args.splice(1));
}; the return line here console.log on {
skipInstall: false,
skipCache: false,
localConfigOnly: false,
askAnswered: false,
force: false,
dryRun: false,
whitespace: false,
bail: false,
skipYoResolve: false,
skipLocalCache: true,
skipParseOptions: false,
experimental: false
} |
It’s not designed to use paths, it relies on lookup and use namespaces. You can use yoe as reference implementation. |
Is |
Yes, https://github.com/yeoman/environment/blob/6bacec60de3cc2bbd8b3f4bd5c890a50f26da013/test/fixtures/generator-commands/generators/arguments/index.js. |
Purpose of this pull request?
What changes did you make?
Is there anything you'd like reviewers to focus on?