diff options
author | Shu Kutsuzawa <cappyzawa@gmail.com> | 2021-02-21 21:22:40 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-21 13:22:40 +0100 |
commit | c0a0e85556147582513e6aa907f59983b7c42b14 (patch) | |
tree | 5592a6dfcd8eadb53759d68d9a56cb589e89684e /docs | |
parent | 4651060999635d654775e9b1d2d7c851d9c3fe58 (diff) |
feat(nodejs): Configure when the module is shown (#2348)
This makes it possible to configure when the nodejs module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/config/README.md | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index 1d6e11c62..7eca0305e 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -1789,7 +1789,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ## NodeJS The `nodejs` module shows the currently installed version of NodeJS. -The module will be shown if any of the following conditions are met: +By default the module will be shown if any of the following conditions are met: - The current directory contains a `package.json` file - The current directory contains a `.node-version` file @@ -1799,13 +1799,16 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | -------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | -| `style` | `"bold green"` | The style for the module. | -| `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | -------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. | +| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | +| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | +| `style` | `"bold green"` | The style for the module. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | ### Variables |