Skip to content

Commit 2636846

Browse files
committed
Rewrite "Getting Started: Users" page
1 parent a886cd4 commit 2636846

File tree

1 file changed

+47
-59
lines changed

1 file changed

+47
-59
lines changed

docs/docs/usage/getting-started.md

Lines changed: 47 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,17 @@ title: Getting Started: Users
55

66

77

8-
Basics
9-
------------
10-
Make sure that you are using Java 8 or later. The output of `java -version`
11-
should contain `1.8`.
8+
## Requirements
9+
Make sure that you are using Java 8. The output of `java -version` should contain `1.8`.
1210

11+
## Trying out Dotty
1312

14-
Option 1: Install Dotty
15-
-------------
16-
If you're a Mac user, you can install dotty with [brew](https://brew.sh/)
13+
### In your web browser
14+
[Scastie](https://scastie.scala-lang.org/?target=dotty), the online Scala playground, supports Dotty.
15+
This is an easy way to try Dotty without installing anything, directly in your browser.
1716

18-
```bash
19-
brew install lampepfl/brew/dotty
20-
```
21-
22-
If you're a Linux or Windows user, download the [latest release](https://github.com/lampepfl/dotty/releases). Optionally add path of the folder `bin/` to the system environment variable `PATH`.
23-
24-
Option 2: Using Dotty directly from source
25-
-------------
26-
```bash
27-
$ git clone --recursive https://github.com/lampepfl/dotty.git
28-
$ cd dotty
29-
$ sbt managedSources # Needed for IDE import to succeed
30-
```
31-
32-
Dotty provides a standard sbt build: compiling, running and starting a repl can
33-
all be done from within sbt:
34-
35-
```bash
36-
$ sbt
37-
> dotc tests/pos/HelloWorld.scala
38-
> dotr HelloWorld
39-
hello world
40-
```
41-
42-
Try Dotty
43-
----------
44-
Try it in your browser with [Scastie](https://scastie.scala-lang.org/?target=dotty)
45-
46-
47-
Create a Dotty Project
48-
-----------------------
49-
The fastest way to create a new project in dotty is using [sbt (0.13.5+)](http://www.scala-sbt.org/)
17+
### sbt
18+
The fastest way to create a new project compiled by Dotty is using [sbt (0.13.13+)](http://www.scala-sbt.org/)
5019

5120
Create a dotty project:
5221
```bash
@@ -58,41 +27,60 @@ Or a Dotty project that cross compiles with Scala 2:
5827
$ sbt new lampepfl/dotty-cross.g8
5928
```
6029

30+
You can then start a Dotty REPL directly from your sbt project:
31+
```bash
32+
$ sbt
33+
> console
34+
Welcome to Scala.next (pre-alpha) (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112).
35+
Type in expressions to have them evaluated.
36+
Type :help for more information.
37+
scala>
38+
```
39+
6140
For an example project, see the [Dotty Example Proejct](https://github.com/lampepfl/dotty-example-project)
6241

42+
### IDE support
43+
Start using the Dotty IDE in any Dotty project by following the
44+
[IDE guide](http://dotty.epfl.ch/docs/usage/ide-support.html).
6345

64-
Bash Scripts
65-
-------------
66-
Assuming that you have cloned the Dotty repo locally, append the following line on your `.bash_profile`:
46+
### Standalone installation
47+
Releases are available for download on the [Releases section](https://github.com/lampepfl/dotty/releases))
48+
of the Dotty repository. Releases include three executables: `dotc` the Dotty compiler,
49+
`dotd` the [Dotty Documentation tool](http://dotty.epfl.ch/docs/usage/dottydoc.html) and `dotr` the Dotty REPL.
6750

68-
```shell
69-
$ export PATH=$HOME/dotty/bin:$PATH
51+
```
52+
.
53+
└── bin
54+
   ├── dotc
55+
   ├── dotd
56+
   └── dotr
7057
```
7158

72-
and you will be able to run the corresponding commands directly from your console:
73-
74-
```shell
59+
Add these executables to your path and you will be able to run the corresponding commands directly
60+
from your console:
61+
```bash
7562
# Compile code using Dotty
76-
$ dotc tests/pos/HelloWorld.scala
63+
$ dotc HelloWorld.scala
7764

7865
# Run it with the proper classpath
7966
$ dotr HelloWorld
80-
```
81-
8267

83-
Starting a REPL
84-
----------------
85-
```bash
86-
$ sbt
87-
> repl
88-
Welcome to Scala.next (pre-alpha) (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_101).
68+
# Start a Dotty REPL
69+
$ dotr
70+
Welcome to Scala.next (pre-alpha) (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112).
8971
Type in expressions to have them evaluated.
9072
Type :help for more information.
9173
scala>
9274
```
9375

94-
or via bash:
76+
If you're a Mac user, we also provide a [homebrew](https://brew.sh/) package that can be installed by running:
9577

96-
```bash
97-
$ dotr
78+
```
79+
brew install lampepfl/brew/dotty
80+
```
81+
82+
In case you have already installed Dotty via brew, you should instead update it:
83+
84+
```
85+
brew upgrade dotty
9886
```

0 commit comments

Comments
 (0)