Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scala-js and scala-native installation #216

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 42 additions & 4 deletions website/docs/_advanced_install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SectionAbout from "../src/components/SectionAbout"
import DownloadButton from "../src/components/DownloadButton"

<SectionAbout title="Advanced Installation">
<div class="margin--lg"/>
<div className="margin--lg"/>
<Tabs
groupId="operating-systems-specific"
defaultValue="windows"
Expand Down Expand Up @@ -231,7 +231,7 @@ brew install Virtuslab/scala-cli/scala-cli


<SectionAbout title="Standalone launcher">
<div class="margin--lg"/>
<div className="margin--lg"/>
<Tabs
defaultValue="macOS/Linux"
groupId="specific-standalone-launcher"
Expand Down Expand Up @@ -267,7 +267,7 @@ Script to automatically download and cache standalone `scala-cli` launcher.


<SectionAbout title="Shell completions">
<div class="margin--lg"/>
<div className="margin--lg"/>
<Tabs
defaultValue="bash"
groupId="shell-specific"
Expand All @@ -282,11 +282,31 @@ Script to automatically download and cache standalone `scala-cli` launcher.


Try the completions with

<Tabs groupId="shell-specific"
defaultValue="bash"
values={[
{label: 'Bash', value: 'bash'},
{label: 'zsh', value: 'zsh'},
]}>
<TabItem value="bash">

```
eval "$(scala-cli install completions --env --shell bash)"
scala-cli --<TAB>
```

</TabItem>
<TabItem value="zsh">

```
eval "$(scala-cli install completions --env)"
eval "$(scala-cli install completions --env --shell zsh)"
scala-cli --<TAB>
```

</TabItem>
</Tabs>

Install them on your system with
```bash
scala-cli install completions
Expand Down Expand Up @@ -315,4 +335,22 @@ scala-cli install completions --shell zsh

</TabItem>
</Tabs>
</div></div>

<div id="scala-js"/>
<SectionAbout title="Scala JS"/>
<div className="row"><div className="col col--9 col--offset-1 padding--lg advanced_install_methods">

To run Scala JS applications [Node.js](https://nodejs.org/) needs to be installed. Scala CLI at this moment does not manage Node.js however it may change in the future.

</div></div>

<div id="scala-native"/>
<SectionAbout title="Scala Native"/>
<div className="row"><div className="col col--9 col--offset-1 padding--lg advanced_install_methods">

[Clang](https://llvm.org/docs/GettingStarted.html#requirements) is required to compile and run Scala Native applications. Using some functionalities known from JDK (like using `java.util.zip` package) require additional packages to be installed.

Scala Native page contains detailed [installation guide](https://scala-native.readthedocs.io/en/latest/user/setup.html#installing-clang-and-runtime-dependencies).

</div></div>
12 changes: 6 additions & 6 deletions website/src/components/SectionAbout.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';

export default function SectionAbout(props){
return <div className="section-about__wrapper row">
<div className="col col--1 big-title pre-title">
&gt;_
</div>
export default function SectionAbout(props){
const id = props.title.toLowerCase().split(" ").join("-")
const link = <a href={"#" + id} >&gt;_</a>
return <div className="section-about__wrapper row" id={id}>
<div className="col col--1 big-title pre-title">{link}</div>
<div className="col col--3 big-title">
<span className="pre-title-mobile">&gt;_</span> {props.title}
<span className="pre-title-mobile">{link}</span> {props.title}
</div>
<div className="col col--8 description">
{props.children}
Expand Down
3 changes: 2 additions & 1 deletion website/src/components/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const featuresList = [
Scala CLI ships with all its dependencies
<br/>
No need to fluff with installing JVM or setting up PATH.
<i>some additional setup may be required for <a href="/install#scala-js">JS</a> and <a href="/install#scala-native">Native</a></i>
</p>
</ImageBox>,
<ImageBox image="universal_tool.svg" title="Universal tool" key="universal"
Expand All @@ -23,7 +24,7 @@ const featuresList = [
If you want to use older <b>version of Scala</b> or
run your code in <b>JS</b> or <b>Native</b> environments we've got you covered.
<br/>
<i>some additional <a href="TODO?">setup</a> may be required for JS and Native</i>
<i>some additional setup may be required for <a href="/install#scala-js">JS</a> and <a href="/install#scala-native">Native</a></i>
</p>
<p>Switching between platforms or Scala versions is as easy as changing a parameter.</p>
</ImageBox>,
Expand Down
6 changes: 4 additions & 2 deletions website/src/scss/components/section-about.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,20 @@
margin-bottom: 15px;
}

.pre-title-mobile{
.pre-title-mobile a{
color: #DE3D3B;
text-decoration: none;

@media ( min-width: 376px){
display: none;
}
}

&.pre-title{
&.pre-title a{
text-align: right;
padding-left: 20px;
color: #DE3D3B;
text-decoration: none;

@media ( max-width: 375px){
display: none;
Expand Down