Skip to content

Commit 4566e06

Browse files
committed
update README, add usage instructions
1 parent df9029b commit 4566e06

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,43 @@
22

33
[![Build Status](https://travis-ci.org/lunduniversity/introprog-scalalib.svg?branch=master)](https://travis-ci.org/lunduniversity/introprog-scalalib)
44

5-
Library with Scala utilities for Computer Science teaching. The library is maintained by Björn Regnell at Lund University, Sweden. Contributions are welcome! For further information see: https://github.com/lunduniversity/introprog
5+
This is a library with Scala utilities for Computer Science teaching. The library is maintained by Björn Regnell at Lund University, Sweden. Contributions are welcome!
6+
7+
The api documentation is available here: http://cs.lth.se/pgk/api/
8+
9+
Se also: http://cs.lth.se/pgk and https://github.com/lunduniversity/introprog
10+
11+
12+
# Manual download
13+
14+
Download the latest jar-file from here: https://github.com/lunduniversity/introprog-scalalib/releases
15+
16+
Put the jar-file on your classpath when you run the Scala REPL, for example:
17+
```
18+
> scala -cp introprog_2.12-0.1.5.jar
19+
scala> val w = new introprog.PixelWindow()
20+
scala> w.fill(100,100,100,100,java.awt.Color.red)
21+
scala>
22+
```
23+
Put the jar-file on your classpath when you run your Scala app, for example:
24+
```
25+
> scala -cp "introprog_2.12-0.1.5.jar:." Main
26+
```
27+
If on Windows cmd/powershell use `;` instead of ´:´.
28+
29+
# Using sbt
30+
31+
If you have the [Scala Build Tool](https://www.scala-sbt.org/download.html) then you can put this text in a file called `build.sbt`
32+
```
33+
scalaVersion := "2.12.6"
34+
libraryDependencies += "se.lth.cs" %% "introprog" % "0.1.5"
35+
```
36+
37+
When you run `sbt` in terminal the introprog lib is automatically downloaded and made available on your classpath.
38+
You can do things like:
39+
```
40+
> sbt
41+
sbt> console
42+
scala> val w = new introprog.PixelWindow()
43+
scala> w.fill(100,100,100,100,java.awt.Color.red)
44+
```

0 commit comments

Comments
 (0)