From 996482b61de74932460508a69c42c560a4ac6243 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Thu, 9 Nov 2023 15:43:01 -0800 Subject: [PATCH 1/3] document both Scala 3 and 2 seeds, putting 3 first --- docs/getting-started/02-sbt-by-example.md | 11 +++++---- src/landing/_template/landing.st | 3 ++- .../06-sbt-new-and-Templates.md | 24 +++++++++---------- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/docs/getting-started/02-sbt-by-example.md b/docs/getting-started/02-sbt-by-example.md index ad9f85ae..a923dd3f 100644 --- a/docs/getting-started/02-sbt-by-example.md +++ b/docs/getting-started/02-sbt-by-example.md @@ -539,13 +539,14 @@ or a continuous test like `~testQuick`. You can use the sbt `new` command to quickly setup a simple "Hello world" build. ``` -\$ sbt new scala/scala-seed.g8 -.... -A minimal Scala project. +\$ sbt new scala/scala3.g8 +``` -name [My Something Project]: hello +This will create a Scala 3 project. If you want to use Scala 2, +use this command instead: -Template applied in ./hello +``` +\$ sbt new scala/scala-seed.g8 ``` When prompted for the project name, type `hello`. diff --git a/src/landing/_template/landing.st b/src/landing/_template/landing.st index 95b79eec..424b148e 100644 --- a/src/landing/_template/landing.st +++ b/src/landing/_template/landing.st @@ -79,7 +79,8 @@ You just need one line of build.sbt to get started with Scala. Lear

sbt new

Choose from community-maintained Giter8 templates to jump start your project: -
\$ sbt new scala/scala-seed.g8
+
\$ sbt new scala/scala3.g8
+\$ sbt new scala/scala-seed.g8
 \$ sbt new playframework/play-scala-seed.g8
 \$ sbt new akka/akka-http-quickstart-scala.g8
 \$ sbt new http4s/http4s.g8
diff --git a/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/06-sbt-new-and-Templates.md b/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/06-sbt-new-and-Templates.md
index e53ba0f7..bb148fb0 100644
--- a/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/06-sbt-new-and-Templates.md
+++ b/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/06-sbt-new-and-Templates.md
@@ -9,38 +9,38 @@ out: sbt-new-and-Templates.html
 sbt new and Templates
 ---------------------
 
-sbt 0.13.13 adds a new command called new, to create new build definitions from a template.
+sbt has a command called new, to create new build definitions from a template.
 The `new` command is extensible via a mechanism called the [template resolver](#Template+Resolver).
 
 ### Trying new command
 
-First, you need sbt's launcher version 0.13.13 or above.
-Normally the exact version for the `sbt` launcher does not matter
-because it will use the version specified by `sbt.version` in `project/build.properties`;
-however for new sbt's launcher 0.13.13 or above is required as the command functions without a `project/build.properties` present.
+First, you need a recent sbt launcher.
 
-Next, run:
+Next run `sbt new scala/scala3.g8` (for Scala 3) or
+`sbt new scala/scala-seed.g8` (for Scala 2).
+
+When asked for a project name, you can put `hello` or anything else
+you want:
 
 ```
-\$ sbt new scala/scala-seed.g8
 ....
 name [hello]:
 
 Template applied in ./hello
 ```
 
-This ran the template [scala/scala-seed.g8](https://github.com/scala/scala-seed.g8) using [Giter8][giter8], prompted for values for "name" (which has a default value of "hello", which we accepted hitting `[Enter]`), and created a build under `./hello`.
+This ran the template using [Giter8][giter8], prompted for a value for "name" (which has a default value of "hello", which we accepted hitting `[Enter]`), and created a build under `./hello`.
 
-`scala-seed` is the official template for a "minimal" Scala project, but it's definitely not the only one out there.
+These are the standard templates for a "minimal" Scala project, but there are many other templates out there.
 
 ### Giter8 support
 
 [Giter8][giter8] is a templating project originally started by Nathan Hamblen in 2010, and now maintained by the [foundweekends][foundweekends] project.
 The unique aspect of Giter8 is that it uses GitHub (or any other git repository) to host the templates, so it allows anyone to participate in template creation. Here are some of the templates provided by official sources:
 
-- [foundweekends/giter8.g8](https://github.com/foundweekends/giter8.g8)                 (A template for Giter8 templates)
-- [scala/scala-seed.g8](https://github.com/scala/scala-seed.g8)                         (Seed template for Scala)
 - [scala/scala3.g8](https://github.com/scala/scala3.g8)                                 (A template for Scala 3 projects)
+- [scala/scala-seed.g8](https://github.com/scala/scala-seed.g8)                         (Seed template for Scala)
+- [foundweekends/giter8.g8](https://github.com/foundweekends/giter8.g8)                 (A template for Giter8 templates)
 - [scala/hello-world.g8](https://github.com/scala/hello-world.g8)                       (A template to demonstrate a minimal Scala application)
 - [scala/scalatest-example.g8](https://github.com/scala/scalatest-example.g8)           (A template for trying out ScalaTest)
 - [akka-quickstart-scala.g8](https://github.com/akka/akka-quickstart-scala.g8)          (A minimal seed template for an Akka with Scala build
@@ -64,7 +64,7 @@ For more, see [Giter8 templates](https://github.com/foundweekends/giter8/wiki/gi
 You can append Giter8 parameters to the end of the command, so for example to specify a particular branch you can use:
 
 ```
-\$ sbt new scala/scala-seed.g8 --branch myBranch
+\$ sbt new scala/scala3.g8 --branch myBranch
 ```
 
 #### How to create a Giter8 template

From a4f886b4258d426ddad2aadadbcd7efc1415a84e Mon Sep 17 00:00:00 2001
From: Seth Tisue 
Date: Wed, 14 Aug 2024 14:53:59 -0700
Subject: [PATCH 2/3] update version number to 1.10.1

---
 docs/getting-started/02-sbt-by-example.md                | 6 +++---
 src/reference/es/00-Getting-Started/02-sbt-by-example.md | 6 +++---
 src/reference/ja/00-Getting-Started/02-sbt-by-example.md | 6 +++---
 src/reference/sbt-by-example.md                          | 2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/docs/getting-started/02-sbt-by-example.md b/docs/getting-started/02-sbt-by-example.md
index a923dd3f..c86fefa3 100644
--- a/docs/getting-started/02-sbt-by-example.md
+++ b/docs/getting-started/02-sbt-by-example.md
@@ -24,8 +24,8 @@ $ touch build.sbt
 
 ```
 $ sbt
-[info] Updated file /tmp/foo-build/project/build.properties: set sbt.version to 1.9.3
-[info] welcome to sbt 1.9.3 (Eclipse Adoptium Java 17.0.8)
+[info] Updated file /tmp/foo-build/project/build.properties: set sbt.version to 1.10.1
+[info] welcome to sbt 1.10.1 (Eclipse Adoptium Java 17.0.8)
 [info] Loading project definition from /tmp/foo-build/project
 [info] loading settings for project foo-build from build.sbt ...
 [info] Set current project to foo-build (in build file:/tmp/foo-build/)
@@ -189,7 +189,7 @@ Use the `reload` command to reload the build. The command causes the
 
 ```
 sbt:foo-build> reload
-[info] welcome to sbt 1.9.3 (Eclipse Adoptium Java 17.0.8)
+[info] welcome to sbt 1.10.1 (Eclipse Adoptium Java 17.0.8)
 [info] loading project definition from /tmp/foo-build/project
 [info] loading settings for project hello from build.sbt ...
 [info] set current project to Hello (in build file:/tmp/foo-build/)
diff --git a/src/reference/es/00-Getting-Started/02-sbt-by-example.md b/src/reference/es/00-Getting-Started/02-sbt-by-example.md
index 744f4401..987e8ff5 100644
--- a/src/reference/es/00-Getting-Started/02-sbt-by-example.md
+++ b/src/reference/es/00-Getting-Started/02-sbt-by-example.md
@@ -27,8 +27,8 @@ o por qué sbt funciona.
 
 ```
 \$ sbt
-[info] Updated file /tmp/foo-build/project/build.properties: set sbt.version to 1.9.3
-[info] welcome to sbt 1.9.3 (Eclipse Adoptium Java 17.0.8)
+[info] Updated file /tmp/foo-build/project/build.properties: set sbt.version to 1.10.1
+[info] welcome to sbt 1.10.1 (Eclipse Adoptium Java 17.0.8)
 [info] Loading project definition from /tmp/foo-build/project
 [info] loading settings for project foo-build from build.sbt ...
 [info] Set current project to foo-build (in build file:/tmp/foo-build/)
@@ -197,7 +197,7 @@ aplicada.
 
 ```
 sbt:foo-build> reload
-[info] welcome to sbt 1.9.3 (Eclipse Adoptium Java 17.0.8)
+[info] welcome to sbt 1.10.1 (Eclipse Adoptium Java 17.0.8)
 [info] loading project definition from /tmp/foo-build/project
 [info] loading settings for project hello from build.sbt ...
 [info] set current project to Hello (in build file:/tmp/foo-build/)
diff --git a/src/reference/ja/00-Getting-Started/02-sbt-by-example.md b/src/reference/ja/00-Getting-Started/02-sbt-by-example.md
index 6f4df3ef..c6781de3 100644
--- a/src/reference/ja/00-Getting-Started/02-sbt-by-example.md
+++ b/src/reference/ja/00-Getting-Started/02-sbt-by-example.md
@@ -27,8 +27,8 @@ sbt の内部がどうなっているかや理由みたいなことを解説す
 
 ```
 \$ sbt
-[info] Updated file /tmp/foo-build/project/build.properties: set sbt.version to 1.9.3
-[info] welcome to sbt 1.9.3 (Eclipse Adoptium Java 17.0.8)
+[info] Updated file /tmp/foo-build/project/build.properties: set sbt.version to 1.10.1
+[info] welcome to sbt 1.10.1 (Eclipse Adoptium Java 17.0.8)
 [info] Loading project definition from /tmp/foo-build/project
 [info] loading settings for project foo-build from build.sbt ...
 [info] Set current project to foo-build (in build file:/tmp/foo-build/)
@@ -186,7 +186,7 @@ ThisBuild / scalaVersion := "$example_scala213$"
 
 ```
 sbt:foo-build> reload
-[info] welcome to sbt 1.9.3 (Eclipse Adoptium Java 17.0.8)
+[info] welcome to sbt 1.10.1 (Eclipse Adoptium Java 17.0.8)
 [info] loading project definition from /tmp/foo-build/project
 [info] loading settings for project hello from build.sbt ...
 [info] set current project to Hello (in build file:/tmp/foo-build/)
diff --git a/src/reference/sbt-by-example.md b/src/reference/sbt-by-example.md
index 6fc0e8fd..01646665 100644
--- a/src/reference/sbt-by-example.md
+++ b/src/reference/sbt-by-example.md
@@ -186,7 +186,7 @@ Use the `reload` command to reload the build. The command causes the
 
 ```
 sbt:foo-build> reload
-[info] welcome to sbt 1.9.3 (Eclipse Adoptium Java 17.0.8)
+[info] welcome to sbt 1.10.1 (Eclipse Adoptium Java 17.0.8)
 [info] loading project definition from /tmp/foo-build/project
 [info] loading settings for project hello from build.sbt ...
 [info] set current project to Hello (in build file:/tmp/foo-build/)

From abfbe9a34f151b1e13a7f64c8593799f9f7d0da0 Mon Sep 17 00:00:00 2001
From: Seth Tisue 
Date: Wed, 14 Aug 2024 14:54:11 -0700
Subject: [PATCH 3/3] respond to review feedback on 'sbt new' adjustments

---
 docs/getting-started/02-sbt-by-example.md |  4 +++-
 src/landing/_template/landing.st          | 18 ++++++++++++------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/docs/getting-started/02-sbt-by-example.md b/docs/getting-started/02-sbt-by-example.md
index c86fefa3..6468fc13 100644
--- a/docs/getting-started/02-sbt-by-example.md
+++ b/docs/getting-started/02-sbt-by-example.md
@@ -537,12 +537,14 @@ or a continuous test like `~testQuick`.
 ### sbt new command
 
 You can use the sbt `new` command to quickly setup a simple "Hello world" build.
+Various templates are available, including these two:
 
 ```
+\$ sbt new scala/toolkit.local
 \$ sbt new scala/scala3.g8
 ```
 
-This will create a Scala 3 project. If you want to use Scala 2,
+These will create a Scala 3 project. If you want to use Scala 2,
 use this command instead:
 
 ```
diff --git a/src/landing/_template/landing.st b/src/landing/_template/landing.st
index 424b148e..1a3c9801 100644
--- a/src/landing/_template/landing.st
+++ b/src/landing/_template/landing.st
@@ -79,12 +79,18 @@ You just need one line of build.sbt to get started with Scala. Lear
 

sbt new

Choose from community-maintained Giter8 templates to jump start your project: -
\$ sbt new scala/scala3.g8
-\$ sbt new scala/scala-seed.g8
-\$ sbt new playframework/play-scala-seed.g8
-\$ sbt new akka/akka-http-quickstart-scala.g8
-\$ sbt new http4s/http4s.g8
-\$ sbt new holdenk/sparkProjectTemplate.g8
+
\$ sbt new scala/toolkit.local  # Scala Toolkit (beta) by Scala Center and VirtusLab
+\$ sbt new typelevel/toolkit.local  # Toolkit to start building Typelevel apps
+\$ sbt new sbt/cross-platform.local  # A cross-JVM/JS/Native project
+\$ sbt new scala/scala3.g8  # Scala 3 seed template
+\$ sbt new scala/scala-seed.g8  # Scala 2 seed template
+\$ sbt new playframework/play-scala-seed.g8  # A Play project in Scala
+\$ sbt new playframework/play-java-seed.g8  # A Play project in Java
+\$ sbt new softwaremill/tapir.g8  # A tapir project using Netty
+\$ sbt new scala-js/vite.g8  # A Scala.JS + Vite project
+\$ sbt new holdenk/sparkProjectTemplate.g8  # A Scala Spark project
+\$ sbt new spotify/scio.g8  # A Scio project
+\$ sbt new disneystreaming/smithy4s.g8  # A Smithy4s project