Skip to content

Commit 60eae70

Browse files
authored
Add brew to main page (#219)
1 parent f608ece commit 60eae70

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

website/src/components/BasicInstall.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,23 @@ import Tabs from '@theme/Tabs';
33
import TabItem from '@theme/TabItem';
44
import BrowserOnly from '@docusaurus/BrowserOnly';
55

6-
const windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE']
7-
8-
function defaultOS(){ return window ? (window.navigator.userAgent.indexOf("Win") != -1 ? "win" : "mac/linux") : "mac/linux" }
6+
const currentOs = () => {
7+
const isCurrentOsEqual = (osShortName) => window.navigator.userAgent.indexOf(osShortName) !== -1
8+
if(isCurrentOsEqual("Win")) return "win"
9+
if(isCurrentOsEqual("Mac")) return "mac"
10+
else return "linux"
11+
}
912

1013
export default function BasicInstall(props){
1114
return <BrowserOnly>{() =>
1215
<div>
1316
<Tabs
1417
groupId="operating-systems"
15-
defaultValue={defaultOS()}
18+
defaultValue={currentOs()}
1619
values={[
1720
{label: 'Windows', value: 'win'},
18-
{label: 'macOS/Linux', value: 'mac/linux'},
21+
{label: 'macOS', value: 'mac'},
22+
{label: 'Linux', value: 'linux'},
1923
]}>
2024

2125
<TabItem value="win">
@@ -24,13 +28,20 @@ export default function BasicInstall(props){
2428
</a>
2529
</TabItem>
2630

27-
<TabItem value="mac/linux">
31+
<TabItem value="linux" >
2832
<p>Run the following one-line command in your terminal</p>
2933
<code>
3034
curl -sSLf https://virtuslab.github.io/scala-cli-packages/scala-setup.sh | sh
3135
</code>
3236
</TabItem>
3337

38+
<TabItem value="mac">
39+
<p>Run the following one-line command in your terminal</p>
40+
<code>
41+
brew install Virtuslab/scala-cli/scala-cli
42+
</code>
43+
</TabItem>
44+
3445
</Tabs>
3546
</div>
3647
}</BrowserOnly>

website/src/components/features.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const featuresList = [
3434
Scala CLI shares some similarities with build tools,
3535
but doesn't aim at supporting multi-module projects,
3636
nor to be extended via a task system known from sbt, mill or bazel.
37-
</p>,
37+
</p>
3838
<p>
3939
Scala ecosystem has multiple amazing build tools, there is no need to create another one.
4040
</p>

website/src/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const Index = (props) => {
3535

3636
<SectionAbout title="Why Scala CLI?">
3737
<p>
38-
Scala CLI combines all the features you need to learn and use Scala in your (single-module) projects. Scala CLI is intuitive <span className="tooltip" data-tooltip="Hello World fdsafdas fdsfdsafd fdasfdasf">and interactive</span>
38+
Scala CLI combines all the features you need to learn and use Scala in your (single-module) projects. Scala CLI is intuitive <span>and interactive</span>
3939
</p>
4040
<p>
4141
If you are bored with reading documentation or landing pages you can just <a href="#install">install</a> and <a href="#enjoy">enjoy `scala-cli`</a>.

0 commit comments

Comments
 (0)