-
Notifications
You must be signed in to change notification settings - Fork 320
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
New getting-started series #608
Conversation
Very nice! While looking at the preview of #606, this was exactly the kind of information I found missing on the current website. I think the command-line/sbt vs InteliJ split is a bit too strict: I would personally create a new project with It also shows in your texts: there's duplication in two pages in "Let's go over this line by line". Another thing: It would be nice to introduce the REPL and IntelliJ worksheets. |
Hey @lrytz there was actually a raging debate at the SC about whether or not to start with Even though all of us who actually use Scala to do real things would prefer to start with |
👍 perhaps there's somewhere Lukas's remarks could be incorporated anyway, like in a sort of footnote or aside later on. |
OK, I see. Maybe a middle ground would be to merge the two paths where it talks about adding tests, to avoid some duplication? Also, the sbt/console section could mention that it's easy (and recommended?) to import an sbt project into IJ. |
@heathermiller ready to merge |
@@ -0,0 +1,94 @@ | |||
# Building a Scala project with IntelliJ and sbt | |||
|
|||
In this tutorial, we'll see how to build a Scala project [sbt](http://www.scala-sbt.org/0.13/docs/index.html). sbt is the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing word here ("with" or "using" sbt)
# Building a Scala project with IntelliJ and sbt | ||
|
||
In this tutorial, we'll see how to build a Scala project [sbt](http://www.scala-sbt.org/0.13/docs/index.html). sbt is the | ||
de facto tool for compiling, running, and testing Scala projects of any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit concerned here about giving the impression that sbt is your only choice and e.g. maven and gradle aren't also options. Suggested:
- change "de facto" to "a common, standard"
- change "It becomes essential" to "Using a build tool becomes essential"
- add some words like "Maven, Gradle, and other popular build tools can also build Scala projects."
## Creating the project | ||
In this section, we'll show you how to create the project in IntelliJ. However, if you're | ||
comfortable with the command line, we recommend you try [Getting | ||
started with Scala with sbt in the command line](https://link) and then come back |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing link here
sbt creates many directories which can be useful once you start building | ||
more complex projects. You can ignore most of them for now | ||
but here's a glance at what everything is for: | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll need a blank line before the triple backquotes
extra functionality to our apps. | ||
1. Open up `build.sbt` and add the following line: | ||
``` | ||
libraryDependencies += "org.typelevel" %% "cats" % "0.9.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid I don't think this is a good choice of example library. I would suggest a Scala module such as scala-xml or scala-parser-combinators.
* Change the code in the class to the following: | ||
```tut | ||
object Hello extends App { | ||
println("Hello, World!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent 2 spaces, not 4
There are multiple libraries and testing methodologies for Scala, | ||
but in this tutorial, we'll demonstrate one popular option from the scalatest framework | ||
called [FunSuite](http://www.scalatest.org/getting_started_with_fun_suite). | ||
We assume you know [how to build a project in IntelliJ](https://linktotutorial). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs proper link
``` | ||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test" | ||
``` | ||
* this will cause sbt to pull down the scalatest library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/scalatest/ScalaTest/
|
||
## Conclusion | ||
You've seen one way to test your Scala code. You can learn more about | ||
scalatest's FunSuite on the [official website](http://www.scalatest.org/getting_started_with_fun_suite). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest adding: Other popular testing frameworks for Scala include ScalaCheck (link) and Specs2 (link).
This looks really helpful. I tried running it locally, but didn't get far. Seems the following are needed:
|
@ashawley thanks for the review. I will do those things. |
e689a89
to
a994037
Compare
a994037
to
a088cec
Compare
Will finish this. |
No description provided.