Skip to content

Commit 89e1f47

Browse files
committed
updated site
1 parent ad8c901 commit 89e1f47

11 files changed

Lines changed: 162 additions & 74 deletions

File tree

2.x/docs/en/guide/build-layout.html

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,10 @@ <h1 id="build-layout"><a class="header" href="#build-layout">Build layout</a></h
247247
</ul>
248248
<h3 id="build-support-files"><a class="header" href="#build-support-files">Build support files</a></h3>
249249
<p>In addition to <code>build.sbt</code>, <code>project</code> directory can contain <code>.scala</code> files
250-
that define helper objects and one-off plugins.
251-
See <a href="Organizing-Build.html">organizing the build</a> for more.</p>
250+
that define helper objects and one-off plugins.</p>
251+
<!--
252+
See [organizing the build][Organizing-Build] for more.
253+
-->
252254
<pre><code>.
253255
├── build.sbt
254256
├── project/
@@ -257,9 +259,8 @@ <h3 id="build-support-files"><a class="header" href="#build-support-files">Build
257259
│ └── plugins.sbt
258260
....
259261
</code></pre>
260-
<p>You may see <code>.sbt</code> files inside <code>project/</code> but they are not equivalent to
261-
<code>.sbt</code> files in the project's base directory. Explaining this will
262-
come <a href="Organizing-Build.html">later</a>, since you'll need some background information first.</p>
262+
<p>You may see <code>.sbt</code> files inside <code>project/</code>, which is typically used to declare plugins.
263+
See <a href="./plugin-basics.html">Plugin basics</a>.</p>
263264
<h3 id="source-code"><a class="header" href="#source-code">Source code</a></h3>
264265
<p>sbt uses the same directory structure as
265266
<a href="https://maven.apache.org/">Maven</a> for source files by default (all paths
@@ -283,18 +284,29 @@ <h3 id="source-code"><a class="header" href="#source-code">Source code</a></h3>
283284
<p>Source code can be placed in the project's base directory as
284285
<code>hello/app.scala</code>, which may be OK for small projects,
285286
though for normal projects people tend to keep the projects in
286-
the <code>src/main/</code> directory to keep things neat.
287-
The fact that you can place <code>*.scala</code> source code in the base directory might seem like
288-
an odd trick, but this fact becomes relevant <a href="Organizing-Build.html">later</a>.</p>
287+
the <code>src/main/</code> directory to keep things neat.</p>
288+
<!--
289+
The fact that you can place `*.scala` source code in the base directory might seem like
290+
an odd trick, but this fact becomes relevant [later][Organizing-Build].
291+
-->
289292
<h3 id="configuring-version-control"><a class="header" href="#configuring-version-control">Configuring version control</a></h3>
290293
<p>Your <code>.gitignore</code> (or equivalent for other version control systems) should
291294
contain:</p>
292295
<pre><code>target/
293296
</code></pre>
297+
<div id="admonition-note" class="admonition admonish-note" role="note" aria-labelledby="admonition-note-title">
298+
<div class="admonition-title">
299+
<div id="admonition-note-title">
300+
<p>Note</p>
301+
</div>
302+
<a class="admonition-anchor-link" href="#admonition-note"></a>
303+
</div>
304+
<div>
294305
<p>Note that this deliberately has a trailing <code>/</code> (to match only directories)
295306
and it deliberately has no leading <code>/</code> (to match <code>project/target/</code> in
296307
addition to plain <code>target/</code>).</p>
297-
<p>sbt automates building, testing, and deployment of your subprojects from information in the build definition.</p>
308+
</div>
309+
</div>
298310

299311
</main>
300312

2.x/docs/en/print.html

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,8 +1516,10 @@ <h2 id="available-plugins"><a class="header" href="#available-plugins">Available
15161516
</ul>
15171517
<h3 id="build-support-files"><a class="header" href="#build-support-files">Build support files</a></h3>
15181518
<p>In addition to <code>build.sbt</code>, <code>project</code> directory can contain <code>.scala</code> files
1519-
that define helper objects and one-off plugins.
1520-
See <a href="guide/Organizing-Build.html">organizing the build</a> for more.</p>
1519+
that define helper objects and one-off plugins.</p>
1520+
<!--
1521+
See [organizing the build][Organizing-Build] for more.
1522+
-->
15211523
<pre><code>.
15221524
├── build.sbt
15231525
├── project/
@@ -1526,9 +1528,8 @@ <h3 id="build-support-files"><a class="header" href="#build-support-files">Build
15261528
│ └── plugins.sbt
15271529
....
15281530
</code></pre>
1529-
<p>You may see <code>.sbt</code> files inside <code>project/</code> but they are not equivalent to
1530-
<code>.sbt</code> files in the project's base directory. Explaining this will
1531-
come <a href="guide/Organizing-Build.html">later</a>, since you'll need some background information first.</p>
1531+
<p>You may see <code>.sbt</code> files inside <code>project/</code>, which is typically used to declare plugins.
1532+
See <a href="guide/./plugin-basics.html">Plugin basics</a>.</p>
15321533
<h3 id="source-code"><a class="header" href="#source-code">Source code</a></h3>
15331534
<p>sbt uses the same directory structure as
15341535
<a href="https://maven.apache.org/">Maven</a> for source files by default (all paths
@@ -1552,18 +1553,29 @@ <h3 id="source-code"><a class="header" href="#source-code">Source code</a></h3>
15521553
<p>Source code can be placed in the project's base directory as
15531554
<code>hello/app.scala</code>, which may be OK for small projects,
15541555
though for normal projects people tend to keep the projects in
1555-
the <code>src/main/</code> directory to keep things neat.
1556-
The fact that you can place <code>*.scala</code> source code in the base directory might seem like
1557-
an odd trick, but this fact becomes relevant <a href="guide/Organizing-Build.html">later</a>.</p>
1556+
the <code>src/main/</code> directory to keep things neat.</p>
1557+
<!--
1558+
The fact that you can place `*.scala` source code in the base directory might seem like
1559+
an odd trick, but this fact becomes relevant [later][Organizing-Build].
1560+
-->
15581561
<h3 id="configuring-version-control"><a class="header" href="#configuring-version-control">Configuring version control</a></h3>
15591562
<p>Your <code>.gitignore</code> (or equivalent for other version control systems) should
15601563
contain:</p>
15611564
<pre><code>target/
15621565
</code></pre>
1566+
<div id="admonition-note" class="admonition admonish-note" role="note" aria-labelledby="admonition-note-title">
1567+
<div class="admonition-title">
1568+
<div id="admonition-note-title">
1569+
<p>Note</p>
1570+
</div>
1571+
<a class="admonition-anchor-link" href="guide/build-layout.html#admonition-note"></a>
1572+
</div>
1573+
<div>
15631574
<p>Note that this deliberately has a trailing <code>/</code> (to match only directories)
15641575
and it deliberately has no leading <code>/</code> (to match <code>project/target/</code> in
15651576
addition to plain <code>target/</code>).</p>
1566-
<p>sbt automates building, testing, and deployment of your subprojects from information in the build definition.</p>
1577+
</div>
1578+
</div>
15671579
<div style="break-before: page; page-break-before: always;"></div><h1 id="sbt-with-ides"><a class="header" href="#sbt-with-ides">sbt with IDEs</a></h1>
15681580
<p>While it's possible to code Scala with just an editor and sbt,
15691581
most programmers today use an Integrated Development Environment, or IDE for short.

2.x/docs/en/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

2.x/docs/ja/guide/build-layout.html

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<!-- Book generated using mdBook -->
55
<meta charset="UTF-8">
6-
<title>Build layout - The Book of sbt</title>
6+
<title>ビルドのレイアウト - The Book of sbt</title>
77

88

99
<!-- Custom HTML head -->
@@ -208,8 +208,8 @@ <h1 class="menu-title">The Book of sbt</h1>
208208

209209
<div id="content" class="content">
210210
<main>
211-
<h1 id="build-layout"><a class="header" href="#build-layout">Build layout</a></h1>
212-
<p>sbt uses conventions for file placement to make it easy to dive into a new sbt build:</p>
211+
<h1 id="ビルドのレイアウト"><a class="header" href="#ビルドのレイアウト">ビルドのレイアウト</a></h1>
212+
<p>sbt は、知らない sbt ビルドを見てもだいたい勝手が分かるようにファイルをどこに置くかの慣習を持っている:</p>
213213
<pre><code>.
214214
├── build.sbt
215215
├── project/
@@ -238,14 +238,17 @@ <h1 id="build-layout"><a class="header" href="#build-layout">Build layout</a></h
238238
└── target/
239239
</code></pre>
240240
<ul>
241-
<li>The local root directory <code>.</code> is the starting point of your build.</li>
242-
<li>In sbt's terminology, the <em>base directory</em> is the directory containing the subproject. In the above, <code>.</code>, <code>subproject-core</code>, and <code>subproject-util</code> are base directories.</li>
243-
<li>The build definition is described in <code>build.sbt</code> (actually any files named <code>*.sbt</code>) in the local root directory.</li>
244-
<li>The sbt version is tracked in <code>project/build.properties</code>.</li>
245-
<li>Generated files (compiled classes, packaged jars, managed files, caches, and documentation) will be written to the <code>target</code> directory by default.</li>
241+
<li><code>.</code> で表記したローカルのルートディレクトリはビルドのスタート地点だ。</li>
242+
<li><strong>ベース・ディレクトリ</strong>は sbt 用語で、サブプロジェクトを構成するディレクトリを指す。上の例では、<code>.</code><code>subproject-core</code><code>subproject-util</code> は全てベース・ディレクトリだ。</li>
243+
<li>ビルド定義は、ローカルのルートディレクトリに置かれた <code>build.sbt</code> にて記述される(実は <code>*.sbt</code> という名前のファイルなら何でもいい)。</li>
244+
<li>sbt のバージョンは <code>project/build.properties</code> によって管理される。</li>
245+
<li>生成されたファイル (コンパイルされたクラス、パッケージ化された JAR、マネージファイル、キャッシュ、ドキュメンテーションなど) はデフォルトでは <code>target</code> ディレクトリに書き込まれる。</li>
246246
</ul>
247-
<h3 id="build-support-files"><a class="header" href="#build-support-files">Build support files</a></h3>
248-
<p>In addition to <code>build.sbt</code>, <code>project</code> directory can contain <code>.scala</code> files that define helper objects and one-off plugins. See <a href="Organizing-Build.html">organizing the build</a> for more.</p>
247+
<h3 id="ビルドサポートファイル"><a class="header" href="#ビルドサポートファイル">ビルドサポートファイル</a></h3>
248+
<p>In addition to <code>build.sbt</code>, <code>project</code> directory can contain <code>.scala</code> files that define helper objects and one-off plugins.</p>
249+
<!--
250+
See [organizing the build][Organizing-Build] for more.
251+
-->
249252
<pre><code>.
250253
├── build.sbt
251254
├── project/
@@ -254,9 +257,9 @@ <h3 id="build-support-files"><a class="header" href="#build-support-files">Build
254257
│ └── plugins.sbt
255258
....
256259
</code></pre>
257-
<p>You may see <code>.sbt</code> files inside <code>project/</code> but they are not equivalent to <code>.sbt</code> files in the project's base directory. Explaining this will come <a href="Organizing-Build.html">later</a>, since you'll need some background information first.</p>
258-
<h3 id="source-code"><a class="header" href="#source-code">Source code</a></h3>
259-
<p>sbt uses the same directory structure as <a href="https://maven.apache.org/">Maven</a> for source files by default (all paths are relative to the base directory):</p>
260+
<p><code>project/</code> 内に <code>.sbt</code> ファイルを見かけることもあるかもしれないが、これらは通常プラグインを宣言するのに用いられる。<a href="./plugin-basics.html">プラグインの基本</a>参照。</p>
261+
<h3 id="ソースコード"><a class="header" href="#ソースコード">ソースコード</a></h3>
262+
<p>ソースコードに関して sbt は、デフォルトで <a href="https://maven.apache.org/">Maven</a> と同じディレクトリ構造を使う:</p>
260263
<pre><code>....
261264
├── src/
262265
│ ├── main/
@@ -271,15 +274,27 @@ <h3 id="source-code"><a class="header" href="#source-code">Source code</a></h3>
271274
│ └── scala-2.13/ &lt;test Scala 2.13 specific sources&gt;
272275
....
273276
</code></pre>
274-
<p>Other directories in <code>src/</code> will be ignored. Additionally, all hidden directories will be ignored.</p>
275-
<p>Source code can be placed in the project's base directory as <code>hello/app.scala</code>, which may be OK for small projects, though for normal projects people tend to keep the projects in the <code>src/main/</code> directory to keep things neat. The fact that you can place <code>*.scala</code> source code in the base directory might seem like an odd trick, but this fact becomes relevant <a href="Organizing-Build.html">later</a>.</p>
276-
<h3 id="configuring-version-control"><a class="header" href="#configuring-version-control">Configuring version control</a></h3>
277-
<p>Your <code>.gitignore</code> (or equivalent for other version control systems) should contain:</p>
277+
<p><code>src/</code> 内の他のディレクトリは無視される。また、隠しディレクトリも無視される。</p>
278+
<p>ソースコードは <code>hello/app.scala</code> のようにプロジェクトのベースディレクトリに置くこともできるが、小さいプロジェクトはともかくとして、通常のプロジェクトでは <code>src/main/</code> 以下のディレクトリにソースを入れて整理するのが普通だ。</p>
279+
<!--
280+
The fact that you can place `*.scala` source code in the base directory might seem like
281+
an odd trick, but this fact becomes relevant [later][Organizing-Build].
282+
-->
283+
<h3 id="バージョン管理の設定"><a class="header" href="#バージョン管理の設定">バージョン管理の設定</a></h3>
284+
<p><code>.gitignore</code> (もしくは、他のバージョン管理システムの同様のファイル)には以下を追加しておくとよいだろう:</p>
278285
<pre><code>target/
279286
</code></pre>
280-
<p>Note that this deliberately has a trailing <code>/</code> (to match only directories) and it deliberately has no leading <code>/</code> (to match <code>project/target/</code> in addition to plain <code>target/</code>).</p>
281-
<p>sbt automates building, testing, and deployment of your subprojects from information in the build definition.</p>
282-
287+
<div id="admonition-note" class="admonition admonish-note" role="note" aria-labelledby="admonition-note-title">
288+
<div class="admonition-title">
289+
<div id="admonition-note-title">
290+
<p>Note</p>
291+
</div>
292+
<a class="admonition-anchor-link" href="#admonition-note"></a>
293+
</div>
294+
<div>
295+
<p>ここでは(ディレクトリだけにマッチさせるために)語尾の <code>/</code> を意図的につけていて、一方で (普通の <code>target/</code> に加えて <code>project/target/</code> にもマッチさせるために)先頭の <code>/</code> は意図的に つけていないことに注意。</p>
296+
</div>
297+
</div>
283298
</main>
284299

285300
<nav class="nav-wrapper" aria-label="Page navigation">

0 commit comments

Comments
 (0)