1
- <p local-class =" copy-help" >Run the following Cargo command in your project directory:</p >
1
+ {{ #if @binNames }}
2
+ {{ #if (is-clipboard-supported )}}
3
+ <CopyButton
4
+ @copyText ={{ this.cargoInstallCommand }}
5
+ title =" Copy command to clipboard"
6
+ local-class =" copy-button"
7
+ >
8
+ <span local-class =" selectable" >{{ this.cargoInstallCommand }} </span >
9
+ {{ svg-jar " copy" aria-hidden =" true" local-class =" copy-icon" }}
10
+ </CopyButton >
11
+ {{ else }}
12
+ <code local-class =" copy-fallback" >
13
+ {{ this.cargoInstallCommand }}
14
+ </code >
15
+ {{ /if }}
2
16
3
- {{ #if (is-clipboard-supported )}}
4
- <CopyButton
5
- @copyText ={{ this.cargoAddCommand }}
6
- title =" Copy command to clipboard"
7
- local-class =" copy-button"
8
- >
9
- <span local-class =" selectable" >{{ this.cargoAddCommand }} </span >
10
- {{ svg-jar " copy" aria-hidden =" true" local-class =" copy-icon" }}
11
- </CopyButton >
12
- {{ else }}
13
- <code local-class =" copy-fallback" >
14
- {{ this.cargoAddCommand }}
15
- </code >
17
+ <p local-class =" copy-help" >
18
+ Running the above command will globally install the following binaries:
19
+ {{ #if (eq @binNames.length 1 )}}
20
+ <span local-class =" bin-name" >{{ get @binNames 0 }} </span >
21
+ {{ else if (eq @binNames.length 2)}}
22
+ <span local-class =" bin-name" >{{ get @binNames 0 }} </span > and <span local-class =" bin-name" >{{ get @binNames 1 }} </span >
23
+ {{ else }}
24
+ {{ #each @binNames as |binName index |~}}
25
+ {{ ~#if (eq index 0 )~}}
26
+ <span local-class =" bin-name" >{{ binName }} </span >
27
+ {{ ~else if (eq index (sum @binNames.length -1))~}}
28
+ , and <span local-class =" bin-name" >{{ binName }} </span >
29
+ {{ ~else ~}}
30
+ , <span local-class =" bin-name" >{{ binName }} </span >
31
+ {{ ~/if }}
32
+ {{ ~/each }}
33
+ {{ /if }}
34
+ </p >
35
+
36
+ {{ /if }}
37
+
38
+ {{ #if (and @hasLib @binNames )}}
39
+ <h3 >Install as library</h3 >
16
40
{{ /if }}
17
41
18
- <p local-class =" copy-help" >Or add the following line to your Cargo.toml:</p >
42
+ {{ #if @hasLib }}
43
+ <p local-class =" copy-help" >Run the following Cargo command in your project directory:</p >
44
+
45
+ {{ #if (is-clipboard-supported )}}
46
+ <CopyButton
47
+ @copyText ={{ this.cargoAddCommand }}
48
+ title =" Copy command to clipboard"
49
+ local-class =" copy-button"
50
+ >
51
+ <span local-class =" selectable" >{{ this.cargoAddCommand }} </span >
52
+ {{ svg-jar " copy" aria-hidden =" true" local-class =" copy-icon" }}
53
+ </CopyButton >
54
+ {{ else }}
55
+ <code local-class =" copy-fallback" >
56
+ {{ this.cargoAddCommand }}
57
+ </code >
58
+ {{ /if }}
59
+
60
+ <p local-class =" copy-help" >Or add the following line to your Cargo.toml:</p >
19
61
20
- {{ #if (is-clipboard-supported )}}
21
- <CopyButton
22
- @copyText ={{ this.tomlSnippet }}
23
- title =" Copy Cargo.toml snippet to clipboard"
24
- local-class =" copy-button"
25
- >
26
- <span local-class =" selectable" >{{ this.tomlSnippet }} </span >
27
- {{ svg-jar " copy" aria-hidden =" true" local-class =" copy-icon" }}
28
- </CopyButton >
29
- {{ else }}
30
- <code local-class =" copy-fallback" >
31
- {{ this.tomlSnippet }}
32
- </code >
62
+ {{ #if (is-clipboard-supported )}}
63
+ <CopyButton
64
+ @copyText ={{ this.tomlSnippet }}
65
+ title =" Copy Cargo.toml snippet to clipboard"
66
+ local-class =" copy-button"
67
+ >
68
+ <span local-class =" selectable" >{{ this.tomlSnippet }} </span >
69
+ {{ svg-jar " copy" aria-hidden =" true" local-class =" copy-icon" }}
70
+ </CopyButton >
71
+ {{ else }}
72
+ <code local-class =" copy-fallback" >
73
+ {{ this.tomlSnippet }}
74
+ </code >
75
+ {{ /if }}
33
76
{{ /if }}
0 commit comments