Skip to content

Keep documentation in one place. #11321

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

Merged
merged 1 commit into from
Feb 9, 2021
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
6 changes: 0 additions & 6 deletions docs/.gitignore

This file was deleted.

123 changes: 0 additions & 123 deletions docs/_includes/features.html

This file was deleted.

28 changes: 0 additions & 28 deletions docs/_includes/getting-started.html

This file was deleted.

43 changes: 0 additions & 43 deletions docs/_includes/logo-page.html

This file was deleted.

15 changes: 0 additions & 15 deletions docs/_includes/table-of-contents.html

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 7 additions & 1 deletion docs/css/frontpage.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import url('https://fonts.googleapis.com/css?family=Lobster&display=swap');

body {
height: 100%;
width: 100%;
Expand Down Expand Up @@ -60,6 +60,12 @@ section.page {
min-height: 100vh;
width: 100%;
padding: 0;
padding-bottom: 2em;
}

section.page strong {
font-weight: bold;
color: rgba(255,255,255,0.6);
}

section .container {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
104 changes: 100 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,104 @@
---
title: Dotty
layout: base
title: Scala 3
layout: main
hasFrame: false
extraCSS:
- css/frontpage.css
---
{% include logo-page.html %}
{% include getting-started.html %}

<section class="page bg-red bg-dark">
<header>
<nav class="navbar navbar-expand-md navbar-dark">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarContent">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarContent">
<ul class="navbar-nav ml-auto mr-0">
<li class="nav-item">
<a class="nav-link" href="#getting-started">
Try it now
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="blog/index.html">
Blog
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="docs/index.html">
Reference
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://docs.scala-lang.org/scala3/">
Docs
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/lampepfl/dotty">
<i class="fab fa-github"></i>
</a>
</li>
</ul>
</div>
</nav>
</header>
<div class="container">
<div class="scala-logo-container">
<img src="images/dotty-logo-white.svg" alt="logo" />
<div class="subtitle text-center">
<h1 id="dotty" class="above-byline">Scala 3</h1>
<p>A next-generation compiler for Scala</p>
<p>(scroll down for more info)</p>
</div>
</div>
</div>
</section>
<section class="page bg-blue bg-dark">
<div class="container">

<h1 id="getting-started">Try Scala 3</h1>
<p>There are multiple ways of <a href="https://docs.scala-lang.org/scala3/getting-started.html">getting started</a> with Scala 3.</p>
<ol>
<li>You can try Scala 3 in your browser with <a href="https://scastie.scala-lang.org/?target=dotty">Scastie</a>.</li>
<li>If you already have sbt installed, you can <a href="#getting-started-with-a-project">create a Scala 3 project</a> and sbt will take care of the rest.</li>
<li>You can install all necessary dependencies with <a href="https://get-coursier.io/">coursier</a> by running <code>cs setup</code>. You can also run <code>cs install scala3-compiler</code> or <code>cs install scala3-repl</code> to install command-line commands for the compiler and repl, correspondingly.</li>
<li>You can <a href="#install">manually install Scala 3</a> on your computer.</li>
</ol>

<h1 id="install">Install Scala 3</h1>
<p>If you are a <strong>Mac</strong> user, you can install Scala 3 with <a href="https://brew.sh/">brew</a>:</p>
<pre><code>brew install lampepfl/brew/dotty</code></pre>

<p>
If you are a <strong>Linux</strong> or <strong>Windows</strong> user, as a prerequisite you need a JDK 8 or later properly installed on your system. The environment variable <code>JAVA_HOME</code> should point to your Java installation.<br/>
For <strong>Windows</strong> users, we recommend using <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">the Windows subsystem for linux</a> or some other bash shell like <a href="https://gitforwindows.org/">git bash</a>.<br/>
Then download the <a href="https://github.com/lampepfl/dotty/releases">latest release</a>. Optionally add the path of the folder <code>bin/</code> to the system environment variable <code>PATH</code>.
</p>

<p>Now you can compile Scala source code:</p>
<pre><code>scalac hello.scala</code></pre>

<p>To start the REPL, run: <code>scala</code>.</p>

<h1 id="getting-started-with-a-project">Create a Scala 3 Project</h1>
<p>The fastest way to create a new project in Scala 3 is using <a href="http://www.scala-sbt.org/">sbt (1.1.4+)</a>.</p>

<p>Create a Scala 3 project:</p>
<pre><code>sbt new <a href="https://github.com/lampepfl/dotty.g8">lampepfl/dotty.g8</a></code></pre>

<p>Or a Scala 3 project that cross compiles with Scala 2:</p>
<pre><code>sbt new <a href="https://github.com/lampepfl/dotty-cross.g8">lampepfl/dotty-cross.g8</a></code></pre>

<p>For documentation see the <a href="https://github.com/lampepfl/dotty-example-project">Scala 3 Example Project</a>.</p>

<h1 id="documentation">Learn more about Scala 3</h1>
<p>You can find much more information about Scala 3 in ...</p>
<ul>
<li>... the <a href="https://docs.scala-lang.org/scala3/">Scala 3 documentation</a>,</li>
<li>... the <a href="https://docs.scala-lang.org/scala3/book/introduction.html">Scala 3 book</a>,</li>
<li>... the <a href="docs/index.html">Scala 3 reference docs</a>,</li>
<li>... the <a href="https://docs.scala-lang.org/scala3/guides.html">Scala 3 guides</a>.</li>
</ul>
</div>
</section>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
2 changes: 1 addition & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,7 @@ object Build {
"-skip-by-id:scala.runtime.MatchCase " +
"-skip-by-regex:.+\\.internal($|\\..+) " +
"-skip-by-regex:.+\\.impl($|\\..+) " +
"-comment-syntax wiki -siteroot scaladoc/scala3-docs -project-logo scaladoc/scala3-docs/logo.svg " +
"-comment-syntax wiki -siteroot docs -project-logo docs/logo.svg " +
"-external-mappings:.*java.*::javadoc::https://docs.oracle.com/javase/8/docs/api/ " +
s"-source-links:$stdLibRoot=github://scala/scala/v${stdlibVersion(Bootstrapped)}#src/library " +
s"-doc-root-content $docRootFile"
Expand Down
1 change: 0 additions & 1 deletion scaladoc/scala3-docs/blog

This file was deleted.

Loading