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