Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 10f5c3f

Browse files
Merge pull request #3328 from dotty-staging/doc-getting-started
Rewrite "Getting Started: Users" page
2 parents d04a8c9 + b9b92e2 commit 10f5c3f

File tree

1 file changed

+41
-61
lines changed

1 file changed

+41
-61
lines changed

‎docs/docs/usage/getting-started.md‎

Lines changed: 41 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -5,94 +5,74 @@ 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+
## Trying out Dotty
129

10+
### In your web browser
11+
[Scastie](https://scastie.scala-lang.org/?target=dotty), the online Scala playground, supports Dotty.
12+
This is an easy way to try Dotty without installing anything, directly in your browser.
1313

14-
Option 1: Install Dotty
15-
-------------
16-
If you're a Mac user, you can install dotty with [brew](https://brew.sh/)
14+
### sbt
15+
The fastest way to create a new project compiled by Dotty is using [sbt (0.13.13+)](http://www.scala-sbt.org/)
1716

17+
Create a simple Dotty project:
1818
```bash
19-
brew install lampepfl/brew/dotty
19+
$ sbt new lampepfl/dotty.g8
2020
```
2121

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-
-------------
22+
Or a Dotty project that cross compiles with Scala 2:
2623
```bash
27-
$ git clone --recursive https://github.com/lampepfl/dotty.git
28-
$ cd dotty
29-
$ sbt managedSources # Needed for IDE import to succeed
24+
$ sbt new lampepfl/dotty-cross.g8
3025
```
3126

32-
Dotty provides a standard sbt build: compiling, running and starting a repl can
33-
all be done from within sbt:
34-
27+
You can then start a Dotty REPL directly from your sbt project:
3528
```bash
3629
$ sbt
37-
> dotc tests/pos/HelloWorld.scala
38-
> dotr HelloWorld
39-
hello world
30+
> console
31+
scala>
4032
```
4133

42-
Try Dotty
43-
----------
44-
Try it in your browser with [Scastie](https://scastie.scala-lang.org/?target=dotty)
34+
For more information, see the [Dotty Example Project](https://github.com/lampepfl/dotty-example-project)
4535

36+
### IDE support
37+
Start using the Dotty IDE in any Dotty project by following the
38+
[IDE guide](http://dotty.epfl.ch/docs/usage/ide-support.html).
4639

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/)
40+
### Standalone installation
41+
Releases are available for download on the [Releases section](https://github.com/lampepfl/dotty/releases))
42+
of the Dotty repository. Releases include three executables: `dotc` the Dotty compiler,
43+
`dotd` the [Dotty Documentation tool](http://dotty.epfl.ch/docs/usage/dottydoc.html) and `dotr` the Dotty REPL.
5044

51-
Create a dotty project:
52-
```bash
53-
$ sbt new lampepfl/dotty.g8
5445
```
55-
56-
Or a Dotty project that cross compiles with Scala 2:
57-
```bash
58-
$ sbt new lampepfl/dotty-cross.g8
46+
.
47+
└── bin
48+
├── dotc
49+
├── dotd
50+
└── dotr
5951
```
6052

61-
For an example project, see the [Dotty Example Proejct](https://github.com/lampepfl/dotty-example-project)
62-
63-
64-
Bash Scripts
65-
-------------
66-
Assuming that you have cloned the Dotty repo locally, append the following line on your `.bash_profile`:
67-
68-
```shell
69-
$ export PATH=$HOME/dotty/bin:$PATH
70-
```
71-
72-
and you will be able to run the corresponding commands directly from your console:
73-
74-
```shell
53+
Add these executables to your `PATH` and you will be able to run the corresponding commands directly
54+
from your console:
55+
```bash
7556
# Compile code using Dotty
76-
$ dotc tests/pos/HelloWorld.scala
57+
$ dotc HelloWorld.scala
7758

7859
# Run it with the proper classpath
7960
$ dotr HelloWorld
61+
62+
# Start a Dotty REPL
63+
$ dotr
64+
Starting dotty REPL...
65+
scala>
8066
```
8167

68+
If you're a Mac user, we also provide a [homebrew](https://brew.sh/) package that can be installed by running:
8269

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).
89-
Type in expressions to have them evaluated.
90-
Type :help for more information.
91-
scala>
70+
```
71+
brew install lampepfl/brew/dotty
9272
```
9373

94-
or via bash:
74+
In case you have already installed Dotty via brew, you should instead update it:
9575

96-
```bash
97-
$ dotr
76+
```
77+
brew upgrade dotty
9878
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /