|
16 | 16 | </ul>
|
17 | 17 | </div>
|
18 | 18 | <div class="main-download">
|
19 |
| - <h2>The most popular way to get Scala is either using Scala through sbt, the Scala build tool, or to use Scala through an IDE.</h2> |
| 19 | + <h2>The easiest way to install Scala through coursier.</h2> |
20 | 20 | <div class="install-steps">
|
21 | 21 | <div class="step">
|
22 | 22 | <img src="/resources/img/download/arrow-asset.png" alt="">
|
23 | 23 | <div class="number-step">1</div>
|
24 | 24 | <div class="text-step">
|
25 |
| - <h3>First, make sure you have the Java 8 JDK (or Java 11 JDK) installed.</h3> |
26 |
| - <p>To check, open the terminal and type:</p> |
27 |
| - <p><code>java -version</code><span>(Make sure you have version 1.8 or 11.)</span></p> |
28 |
| - <p><i>(If you don't have it installed, download Java from <a href="https://www.oracle.com/java/technologies/javase-jdk8-downloads.html">Oracle Java 8</a>, <a href="https://www.oracle.com/java/technologies/javase-jdk11-downloads.html">Oracle Java 11</a>, or <a href="https://adoptopenjdk.net/">AdoptOpenJDK 8/11</a>. Refer <a href="https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html">JDK Compatibility</a> for Scala/Java compatiblity detail.</i></p> |
| 25 | + <h3>First, install Java, Scala, and all related command-line tools.</h3> |
| 26 | + <div id="download-step-one"> |
| 27 | + <p>Download <a href="https://get-coursier.io/docs/cli-overview.html#install-native-launcher">the native launcher of coursier</a> then install everything with:</p> |
| 28 | + <p><code>$ ./cs setup</code><span> (Adapt to your operating system)</span></p> |
| 29 | + </div> |
| 30 | + <p>(See <a href="https://get-coursier.io/docs/cli-overview.html#install-native-launcher">the instructions for other operating systems</a>.) |
29 | 31 | </div>
|
30 | 32 | </div>
|
31 | 33 | <div class="step">
|
32 | 34 | <div class="number-step">2</div>
|
33 | 35 | <div class="text-step">
|
34 |
| - <h3>Then, install Scala:</h3> |
35 |
| - <p>...either by installing an IDE such as IntelliJ, or sbt, Scala's build tool.</p> |
| 36 | + <h3><i>(Optional)</i> Then, install an IDE for Scala.</h3> |
| 37 | + <p>The two most popular IDEs for Scala are IntelliJ and VS Code with Metals.</p> |
36 | 38 | </div>
|
37 | 39 | </div>
|
38 | 40 | <div class="download-options">
|
39 | 41 | <div class="download-intellij">
|
40 | 42 | <span class="or">or</span>
|
41 | 43 | <div class="description">
|
42 | 44 | <img src="/resources/img/download/arrow-left.png" alt="">
|
43 |
| - <p>Best if you prefer a full-featured IDE (recommended for beginners)</p> |
| 45 | + <p>Best if you prefer to start without build tool (recommended for beginners)</p> |
44 | 46 | </div>
|
45 | 47 | <a href="" class="btn-download" id="download-intellij-link">
|
46 | 48 | <i class="fa fa-download"></i>
|
47 |
| - <span>Download intellij</span> |
| 49 | + <span>Download IntelliJ</span> |
48 | 50 | </a>
|
49 | 51 | <ul>
|
50 |
| - {% include tutorial-list.html column=1 %} |
| 52 | + <li><a href="/documentation/getting-started-intellij-track/getting-started-with-scala-in-intellij.html"><i class="fa fa-file-text-o"></i>Getting Started with Scala in IntelliJ</a></li> |
| 53 | + <li><a href="/documentation/getting-started-intellij-track/building-a-scala-project-with-intellij-and-sbt.html"><i class="fa fa-file-text-o"></i>Building a Scala Project with IntelliJ and sbt</a></li> |
| 54 | + <li><a href="/documentation/getting-started-intellij-track/testing-scala-in-intellij-with-scalatest.html"><i class="fa fa-file-text-o"></i>Testing Scala in IntelliJ with ScalaTest</a></li> |
51 | 55 | </ul>
|
52 | 56 | </div>
|
53 |
| - <div class="download-sbt"> |
| 57 | + <div class="download-vscode"> |
54 | 58 | <div class="description">
|
55 | 59 | <img src="/resources/img/download/arrow-right.png" alt="">
|
56 |
| - <p>Best if you are familiar with the command line</p> |
| 60 | + <p>Best if you are familiar with the command line and build tools</p> |
57 | 61 | </div>
|
58 |
| - <a href="" class="btn-download" id="download-sbt-link"> |
| 62 | + <a href="" class="btn-download" id="download-vscode-link"> |
59 | 63 | <i class="fa fa-download"></i>
|
60 |
| - <span>Download Sbt</span> |
| 64 | + <span>Download VS Code</span> |
61 | 65 | </a>
|
62 | 66 | <ul>
|
63 |
| - {% include tutorial-list.html column=0 %} |
| 67 | + <li><a href="https://scalameta.org/metals/docs/editors/vscode.html"><i class="fa fa-file-text-o"></i>Getting Started with Scala in VS Code</a></li> |
| 68 | + <li><a href="/documentation/getting-started-sbt-track/getting-started-with-scala-and-sbt-on-the-command-line.html"><i class="fa fa-file-text-o"></i>Getting Started with Scala and sbt on the Command Line</a></li> |
| 69 | + <li><a href="/documentation/getting-started-sbt-track/testing-scala-with-sbt-on-the-command-line.html"><i class="fa fa-file-text-o"></i>Testing Scala with sbt and ScalaTest on the Command Line</a></li> |
64 | 70 | </ul>
|
65 | 71 | </div>
|
66 | 72 | </div>
|
67 | 73 |
|
68 | 74 | <p class="bottom-lead">
|
69 |
| - Compared to other programming languages, installing Scala is a bit unusual. Scala is unusual because it is usually installed for each of your Scala projects rather than being installed system-wide. Both of the above options manage (via sbt) a specific Scala version per Scala project you create. |
70 |
| - <br><br> |
71 |
| - But it's also possible to "install" Scala in numerous other ways; e.g., grab Scala binaries and use Scala from the command line or use Scala in your browser! |
72 |
| - <br><br> |
| 75 | + Compared to other programming languages, installing Scala is a bit unusual. |
| 76 | + In addition to the system-wide installation mentioned above, build tools such as sbt will automatically manage a specific Scala version per Scala project you create. |
| 77 | + This makes sure that there are no version conflicts between different Scala projects on your computer. |
73 | 78 | </p>
|
74 | 79 |
|
75 | 80 | <!-- <p class="bottom-lead"><h2>Other</h2></p> -->
|
@@ -108,11 +113,32 @@ <h3>License</h3>
|
108 | 113 | </div>
|
109 | 114 | </div>
|
110 | 115 |
|
111 |
| - {% for step in site.data.downloads.stepOne %} |
112 |
| - <div style="display:none" id="stepOne-{{step.os}}">{{step.text}}</div> |
113 |
| - {% endfor %} {% for intellijUrl in site.data.downloads.intellijUrls %} |
114 |
| - <div style="display:none" id="intellij-{{intellijUrl.os}}">{{intellijUrl.url}}</div> |
115 |
| - {% endfor %} {% for sbtUrl in site.data.downloads.sbtUrls %} |
116 |
| - <div style="display:none" id="sbt-{{sbtUrl.os}}">{{sbtUrl.url}}</div> |
117 |
| - {% endfor %} |
| 116 | + <!-- Hidden elements whose content are used to provide OS-specific download instructions. |
| 117 | + -- This is handled in `resources/js/functions.js`. |
| 118 | + --> |
| 119 | + |
| 120 | + <div style="display:none" id="stepOne-linux"> |
| 121 | + <p><code>$ curl -Lo cs https://git.io/coursier-cli-linux && chmod +x cs && ./cs setup</code></p> |
| 122 | + </div> |
| 123 | + <div style="display:none" id="stepOne-unix"> |
| 124 | + <p>Follow <a href="https://get-coursier.io/docs/cli-overview.html#install-native-launcher" target="_blank">the instructions to install the <code>cs</code> launcher</a> then run:</p> |
| 125 | + <p><code>$ ./cs setup</code></p> |
| 126 | + </div> |
| 127 | + <div style="display:none" id="stepOne-macos"> |
| 128 | + <p><code>$ curl -Lo cs https://git.io/coursier-cli-macos && chmod +x cs && (xattr -d com.apple.quarantine cs || true) && ./cs setup</code></p> |
| 129 | + <p><span>Alternatively you can use Homebrew: </span><code>$ brew install coursier/formulas/coursier && cs setup</code></p> |
| 130 | + </div> |
| 131 | + <div style="display:none" id="stepOne-windows"> |
| 132 | + <p>Download and execute <a href="https://git.io/coursier-cli-windows-exe">the Scala installer for Windows</a> based on coursier</p> |
| 133 | + </div> |
| 134 | + |
| 135 | + <div style="display:none" id="intellij-linux">https://www.jetbrains.com/idea</div> |
| 136 | + <div style="display:none" id="intellij-unix">https://www.jetbrains.com/idea</div> |
| 137 | + <div style="display:none" id="intellij-macos">https://www.jetbrains.com/idea</div> |
| 138 | + <div style="display:none" id="intellij-windows">https://www.jetbrains.com/idea</div> |
| 139 | + |
| 140 | + <div style="display:none" id="vscode-linux">https://code.visualstudio.com/download</div> |
| 141 | + <div style="display:none" id="vscode-unix">https://code.visualstudio.com/download</div> |
| 142 | + <div style="display:none" id="vscode-macos">https://code.visualstudio.com/download</div> |
| 143 | + <div style="display:none" id="vscode-windows">https://code.visualstudio.com/download</div> |
118 | 144 | </section>
|
0 commit comments