Skip to content

Commit

Permalink
docs: show available providers in options (#2539)
Browse files Browse the repository at this point in the history
Show a complete list of available providers that can be used as
parameter to the --provider install option.
  • Loading branch information
canadaduane committed Jun 18, 2023
1 parent 742262e commit 52cadea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs.md
Expand Up @@ -41,7 +41,7 @@ If no modules are given, all "imports" in the initial map are relinked.
* `-o, --output` _<file>_ File to inject the final import map into (default: --map / importmap.json)
* `-e, --env` <[environments](#environments)> Comma-separated environment condition overrides
* `-r, --resolution` <[resolutions](#resolutions)> Comma-separated dependency resolution overrides
* `-p, --provider` <[providers](#providers)> Default module provider
* `-p, --provider` <[providers](#providers)> Default module provider. Available providers: jspm.io, nodemodules, deno, jsdelivr, skypack, unpkg, esm.sh, jspm.io#system
* `--cache` _<mode>_ Cache mode for fetches (online, offline, no-cache) (default: online)
* `--root` _<url>_ URL to treat as server root, i.e. rebase import maps against
* `--preload` _[mode]_ Add module preloads to HTML output (default: static, dynamic)
Expand Down Expand Up @@ -84,7 +84,7 @@ If no packages are provided, all "imports" in the initial map are reinstalled.
* `-o, --output` _<file>_ File to inject the final import map into (default: --map / importmap.json)
* `-e, --env` <[environments](#environments)> Comma-separated environment condition overrides
* `-r, --resolution` <[resolutions](#resolutions)> Comma-separated dependency resolution overrides
* `-p, --provider` <[providers](#providers)> Default module provider
* `-p, --provider` <[providers](#providers)> Default module provider. Available providers: jspm.io, nodemodules, deno, jsdelivr, skypack, unpkg, esm.sh, jspm.io#system
* `--cache` _<mode>_ Cache mode for fetches (online, offline, no-cache) (default: online)
* `--root` _<url>_ URL to treat as server root, i.e. rebase import maps against
* `--preload` _[mode]_ Add module preloads to HTML output (default: static, dynamic)
Expand Down Expand Up @@ -135,7 +135,7 @@ Uninstalls packages from an import map. The given packages must be valid package
* `-o, --output` _<file>_ File to inject the final import map into (default: --map / importmap.json)
* `-e, --env` <[environments](#environments)> Comma-separated environment condition overrides
* `-r, --resolution` <[resolutions](#resolutions)> Comma-separated dependency resolution overrides
* `-p, --provider` <[providers](#providers)> Default module provider
* `-p, --provider` <[providers](#providers)> Default module provider. Available providers: jspm.io, nodemodules, deno, jsdelivr, skypack, unpkg, esm.sh, jspm.io#system
* `--cache` _<mode>_ Cache mode for fetches (online, offline, no-cache) (default: online)
* `--root` _<url>_ URL to treat as server root, i.e. rebase import maps against
* `--preload` _[mode]_ Add module preloads to HTML output (default: static, dynamic)
Expand Down Expand Up @@ -168,7 +168,7 @@ Updates packages in an import map to the latest versions that are compatible wit
* `-o, --output` _<file>_ File to inject the final import map into (default: --map / importmap.json)
* `-e, --env` <[environments](#environments)> Comma-separated environment condition overrides
* `-r, --resolution` <[resolutions](#resolutions)> Comma-separated dependency resolution overrides
* `-p, --provider` <[providers](#providers)> Default module provider
* `-p, --provider` <[providers](#providers)> Default module provider. Available providers: jspm.io, nodemodules, deno, jsdelivr, skypack, unpkg, esm.sh, jspm.io#system
* `--cache` _<mode>_ Cache mode for fetches (online, offline, no-cache) (default: online)
* `--root` _<url>_ URL to treat as server root, i.e. rebase import maps against
* `--preload` _[mode]_ Add module preloads to HTML output (default: static, dynamic)
Expand Down
4 changes: 2 additions & 2 deletions src/cli.ts
Expand Up @@ -22,7 +22,7 @@ import install from "./install";
import link from "./link";
import uninstall from "./uninstall";
import update from "./update";
import { JspmError, wrapCommand } from "./utils";
import { JspmError, availableProviders , wrapCommand } from "./utils";

export const cli = cac(c.yellow("jspm"));

Expand All @@ -44,7 +44,7 @@ const resolutionOpt: opt = [
];
const providerOpt: opt = [
"-p, --provider <provider>",
"Default module provider",
`Default module provider. Available providers: ${availableProviders.join(", ")}`,
{},
];
const stdoutOpt: opt = [
Expand Down

0 comments on commit 52cadea

Please sign in to comment.