feat(nx): show segment on nx.json presence

This commit is contained in:
Jan De Dobbeleer 2022-08-13 13:34:46 +02:00 committed by Jan De Dobbeleer
parent 45237c956c
commit 5502acb585
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ func (a *Nx) Init(props properties.Properties, env environment.Environment) {
a.language = language{ a.language = language{
env: env, env: env,
props: props, props: props,
extensions: []string{"workspace.json"}, extensions: []string{"workspace.json", "nx.json"},
commands: []*cmd{ commands: []*cmd{
{ {
regex: `(?:(?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+))))`, regex: `(?:(?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+))))`,

View file

@ -27,7 +27,7 @@ Display the currently active [Nx][nx-docs] version.
- fetch_version: `boolean` - fetch the active version or not; useful if all you need is an icon indicating `ng` - fetch_version: `boolean` - fetch the active version or not; useful if all you need is an icon indicating `ng`
- display_mode: `string` - determines when the segment is displayed - display_mode: `string` - determines when the segment is displayed
- `always`: the segment is always displayed - `always`: the segment is always displayed
- `files`: the segment is only displayed when `workspace.json` file is present (default) - `files`: the segment is only displayed when a `workspace.json` or `nx.json` file is present (default)
- version_url_template: `string` - a go [text/template][go-text-template] [template][templates] that creates - version_url_template: `string` - a go [text/template][go-text-template] [template][templates] that creates
the URL of the version info / release notes the URL of the version info / release notes