Skip to content
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

Project bootstrap #2

Merged
merged 4 commits into from
Dec 7, 2017
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ indent_style = space
indent_size = 4
insert_final_newline = true

[*.scala]
[*.{scala,sbt}]
indent_size = 2
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.idea/

target/
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: scala
sudo: false
jdk: oraclejdk8
scala: 2.12.3
script: sbt test
38 changes: 37 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,43 @@
Euclid
Euclid [![Build Status (Travis)][badge-travis]][build-travis] [![Build Status (Appveyor)][badge-appveyor]][build-appveyor]
======

Euclid will be a UI framework for terminal environments, like actual desktop
terminal emulator or [rot.js][rot-js].

Build
-----

To build the project (just a stub for now), install [SBT][sbt] and then execute
the following command in your terminal:

```console
$ sbt compile
```

Test
----

To execute the automatic test suite, run the following command in your terminal:

```console
$ sbt test
```

Run
---

To run the manual test projects (just stubs for now) for JVM and Scala.js,
execute the following commands in your terminal:

```console
$ sbt 'project euclidJVM' run
$ sbt 'project euclidJS' run
```

[build-appveyor]: https://ci.appveyor.com/project/ForNeVeR/euclid/branch/master
[build-travis]: https://travis-ci.org/codingteam/euclid
[rot-js]: http://ondras.github.io/rot.js/hp/
[sbt]: http://www.scala-sbt.org/

[badge-appveyor]: https://ci.appveyor.com/api/projects/status/gr42tg6db572jts6/branch/master?svg=true
[badge-travis]: https://travis-ci.org/codingteam/euclid.svg?branch=master
12 changes: 12 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '{build}'
install:
- cmd: choco install sbt --version 1.0.2
- cmd: set PATH=C:\Program Files (x86)\sbt\bin;%PATH%
build_script:
- sbt compile
test_script:
- sbt test
cache:
- C:\ProgramData\chocolatey\lib -> appveyor.yml
- C:\Program Files (x86)\sbt -> appveyor.yml
- C:\Users\appveyor\.ivy2
23 changes: 23 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name := "Euclid root"
scalaVersion in ThisBuild := "2.12.3"

lazy val root = project.in(file("."))
.aggregate(euclidJS, euclidJVM)
.settings(
publish := {},
publishLocal := {}
)

lazy val euclid = crossProject.in(file("."))
.settings(
name := "euclid",
version := "0.0.1-SNAPSHOT",
libraryDependencies += "org.scalatest" %%% "scalatest" % "3.0.4" % "test"
)
.jvmSettings()
.jsSettings(
scalaJSUseMainModuleInitializer := true
)

lazy val euclidJVM = euclid.jvm
lazy val euclidJS = euclid.js
7 changes: 7 additions & 0 deletions js/src/main/scala/ru/org/codingteam/euclid/EuclidJsApp.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package ru.org.codingteam.euclid

object EuclidJsApp {
def main(args: Array[String]): Unit = {
Euclid.hello(args)
}
}
10 changes: 10 additions & 0 deletions js/src/test/scala/ru/org/codingteam/euclid/TestJs.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package ru.org.codingteam.euclid

import collection.mutable.Stack
import org.scalatest._

class TestJs extends FlatSpec with Matchers {
"The test" should "pass" in {
1 should be (1)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package ru.org.codingteam.euclid

object EuclidJvmApp {
def main(args: Array[String]): Unit = {
Euclid.hello(args)
}
}
10 changes: 10 additions & 0 deletions jvm/src/test/scala/ru/org/codingteam/euclid/TestJvm.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package ru.org.codingteam.euclid

import collection.mutable.Stack
import org.scalatest._

class TestJvm extends FlatSpec with Matchers {
"The test" should "pass" in {
1 should be (1)
}
}
1 change: 1 addition & 0 deletions project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.0.3
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.21")
7 changes: 7 additions & 0 deletions shared/src/main/scala/ru/org/codingteam/euclid/Euclid.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package ru.org.codingteam.euclid

object Euclid {
def hello(args: Array[String]): Unit = {
println("Hello world!")
}
}
10 changes: 10 additions & 0 deletions shared/src/test/scala/ru/org/codingteam/euclid/TestShared.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package ru.org.codingteam.euclid

import collection.mutable.Stack
import org.scalatest._

class TestShared extends FlatSpec with Matchers {
"The test" should "pass" in {
1 should be (1)
}
}