Skip to content

Commit

Permalink
Add --local-only option (#624)
Browse files Browse the repository at this point in the history
* Add --local-only option

* Indentation in lib/usage.txt

Co-Authored-By: LitoMore <LitoMore@users.noreply.github.com>

* Add --generators option back to completion tests

* Add test to cover local-only option
  • Loading branch information
sripberger authored and SBoudrias committed Jul 4, 2019
1 parent fbb341e commit f6ce56d
Show file tree
Hide file tree
Showing 8 changed files with 290 additions and 271 deletions.
2 changes: 1 addition & 1 deletion lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function init() {
});

// Lookup for every namespaces, within the environments.paths and lookups
env.lookup(() => {
env.lookup(firstCmd.opts.localOnly || false, () => {
const generatorList = createGeneratorList(env);

// List generators
Expand Down
5 changes: 3 additions & 2 deletions lib/usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ General options:
--version # Print version
--no-color # Disable colors
--[no-]insight # Toggle anonymous tracking
--generators # Print available generators
--generators # Print available generators
--local-only # Disable lookup of globally-installed generators

Install a generator:

Expand All @@ -16,7 +17,7 @@ Install a generator:
$ yo angular --help

Run local generators:

Additionally, you can also run local generators without installing via npm.

$ yo ./path/to/some/generator
Expand Down
Loading

0 comments on commit f6ce56d

Please sign in to comment.