Skip to content

Commit

Permalink
Deploy website
Browse files Browse the repository at this point in the history
Deploy website version based on c1c9bbb
  • Loading branch information
Docusaurus bot committed Oct 11, 2024
1 parent fc844fb commit 7b5c67c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -7272,7 +7272,7 @@ <h2><a class="anchor" aria-hidden="true" id="other"></a><a href="#other" aria-hi
pseudo-formatting similar to but incompatible with <code>scalafmt.conf</code>.
Some of them show values which can't be explicitly specified.</p>
</blockquote>
<pre><code class="hljs"><span class="hljs-attr">version</span> = <span class="hljs-string">"3.8.3"</span>
<pre><code class="hljs"><span class="hljs-attr">version</span> = <span class="hljs-string">"3.8.4-RC1"</span>
<span class="hljs-attr">maxColumn</span> = <span class="hljs-number">80</span>
docstrings.<span class="hljs-attr">oneline</span> = keep
docstrings.<span class="hljs-attr">removeEmpty</span> = <span class="hljs-literal">false</span>
Expand Down
36 changes: 18 additions & 18 deletions docs/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h2><a class="anchor" aria-hidden="true" id="sbt"></a><a href="#sbt" aria-hidden
<p>Latest published version of the sbt plugin:
<a href="https://index.scala-lang.org/scalameta/sbt-scalafmt/sbt-scalafmt"><img src="https://index.scala-lang.org/scalameta/sbt-scalafmt/sbt-scalafmt/latest.svg" alt="sbt-scalafmt Scala version support"></a></p>
<p>To configure the scalafmt version add the following line into <code>.scalafmt.conf</code>:</p>
<pre><code class="hljs">version = <span class="hljs-number">3.8</span><span class="hljs-number">.3</span>
<pre><code class="hljs">version = <span class="hljs-number">3.8</span><span class="hljs-number">.4</span>-RC1
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="task-keys"></a><a href="#task-keys" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Task keys</h3>
<ul>
Expand Down Expand Up @@ -236,22 +236,22 @@ <h4><a class="anchor" aria-hidden="true" id="install"></a><a href="#install" ari
<a href="https://get-coursier.io/docs/cli-overview.html#install">installation</a>
of packages, the simplest approach is by running</p>
<pre><code class="hljs css language-sh">cs install scalafmt
scalafmt --version <span class="hljs-comment"># should be 3.8.3</span>
scalafmt --version <span class="hljs-comment"># should be 3.8.4-RC1</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="standalone"></a><a href="#standalone" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>standalone</h4>
<p>Alternatively, you can create a complete standalone executable (40+ MB in 2022) with:</p>
<pre><code class="hljs css language-sh">coursier bootstrap org.scalameta:scalafmt-cli_2.13:3.8.3 \
<pre><code class="hljs css language-sh">coursier bootstrap org.scalameta:scalafmt-cli_2.13:3.8.4-RC1 \
-r sonatype:snapshots --main org.scalafmt.cli.Cli \
--standalone \
-o scalafmt
./scalafmt --version <span class="hljs-comment"># should be 3.8.3</span>
./scalafmt --version <span class="hljs-comment"># should be 3.8.4-RC1</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="slim"></a><a href="#slim" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>slim</h4>
<p>Finally, you can choose to obtain a slim bootstrap script (100+ KB in 2022) instead with:</p>
<pre><code class="hljs css language-sh">coursier bootstrap org.scalameta:scalafmt-cli_2.13:3.8.3 \
<pre><code class="hljs css language-sh">coursier bootstrap org.scalameta:scalafmt-cli_2.13:3.8.4-RC1 \
-r sonatype:snapshots --main org.scalafmt.cli.Cli \
-o scalafmt
./scalafmt --version <span class="hljs-comment"># should be 3.8.3</span>
./scalafmt --version <span class="hljs-comment"># should be 3.8.4-RC1</span>
</code></pre>
<p>If a <code>version</code> is defined in <code>.scalafmt.conf</code>, the CLI binary will honor it
by automatically resolving and downloading the corresponding artifacts if it
Expand All @@ -265,7 +265,7 @@ <h4><a class="anchor" aria-hidden="true" id="slim"></a><a href="#slim" aria-hidd
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="pre-release"></a><a href="#pre-release" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Pre-release</h3>
<p>Our CI publishes a pre-release version of scalafmt to Sonatype Snapshots on
every merge into master. To use a pre-release, replace 3.8.3 with the
every merge into master. To use a pre-release, replace 3.8.4-RC1 with the
version here:</p>
<p><a href="https://oss.sonatype.org/content/repositories/snapshots/org/scalameta/scalafmt-cli_2.12/"><img src="https://img.shields.io/nexus/s/https/oss.sonatype.org/org.scalameta/scalafmt-cli_2.12.svg" alt="Sonatype Snapshots"></a></p>
<p>If you use coursier to install a pre-release, be sure to include the flag
Expand All @@ -276,11 +276,11 @@ <h3><a class="anchor" aria-hidden="true" id="pre-release"></a><a href="#pre-rele
<h3><a class="anchor" aria-hidden="true" id="native-image"></a><a href="#native-image" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Native image</h3>
<p>For macOS and Linux, it's possible to download pre-built GraalVm native binaries
with instant startup and fast performance for short-lived Scalafmt runs.</p>
<pre><code class="hljs css language-sh">VERSION=3.8.3
<pre><code class="hljs css language-sh">VERSION=3.8.4-RC1
INSTALL_LOCATION=/usr/<span class="hljs-built_in">local</span>/bin/scalafmt-native
curl https://raw.githubusercontent.com/scalameta/scalafmt/master/bin/install-scalafmt-native.sh | \
bash -s -- <span class="hljs-variable">$VERSION</span> <span class="hljs-variable">$INSTALL_LOCATION</span>
scalafmt-native --<span class="hljs-built_in">help</span> <span class="hljs-comment"># should show version 3.8.3</span>
scalafmt-native --<span class="hljs-built_in">help</span> <span class="hljs-comment"># should show version 3.8.4-RC1</span>
</code></pre>
<blockquote>
<p>The native image binaries have the limitation of working only with one version
Expand All @@ -300,12 +300,12 @@ <h3><a class="anchor" aria-hidden="true" id="nailgun"></a><a href="#nailgun" ari
<li>Create a standalone executable in <code>/usr/local/bin/scalafmt_ng</code> with (sudo if
necessary)</li>
</ul>
<pre><code class="hljs css language-sh">coursier bootstrap --standalone org.scalameta:scalafmt-cli_2.13:3.8.3 \
<pre><code class="hljs css language-sh">coursier bootstrap --standalone org.scalameta:scalafmt-cli_2.13:3.8.4-RC1 \
-r sonatype:snapshots -f --main com.martiansoftware.nailgun.NGServer \
-o /usr/<span class="hljs-built_in">local</span>/bin/scalafmt_ng
scalafmt_ng &amp; // start nailgun <span class="hljs-keyword">in</span> background
ng ng-alias scalafmt org.scalafmt.cli.Cli
ng scalafmt --version <span class="hljs-comment"># should be 3.8.3</span>
ng scalafmt --version <span class="hljs-comment"># should be 3.8.4-RC1</span>
</code></pre>
<p>Nailgun keeps scalafmt running on a local server to avoid the JVM startup
penalty and also so scalafmt can benefit from JIT. This makes scalafmt up to 10x
Expand All @@ -317,7 +317,7 @@ <h3><a class="anchor" aria-hidden="true" id="homebrew"></a><a href="#homebrew" a
<a href="#coursier">Coursier</a>, itself available via Homebrew.</p>
<pre><code class="hljs css language-sh">brew install coursier/formulas/coursier
coursier install scalafmt
scalafmt --version // should be 3.8.3
scalafmt --version // should be 3.8.4-RC1
</code></pre>
<p>If necessary, make sure to follow the Coursier instructions for updating
<code>$PATH</code> so that the <code>scalafmt</code> binary becomes available in your terminal.</p>
Expand All @@ -327,13 +327,13 @@ <h3><a class="anchor" aria-hidden="true" id="arch-linux"></a><a href="#arch-linu
package that installs scalafmt binary built with GraalVM. GraalVM native binary
provides instant startup without Nailgun.</p>
<pre><code class="hljs css language-sh">yaourt -S scalafmt-native-bin
scalafmt --version // should be 3.8.3
scalafmt --version // should be 3.8.4-RC1
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="--help"></a><a href="#--help" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>--help</h3>
<pre><code class="hljs">build commit: c1c9bbb31ffc55a1e21466ebabbd4bda5233f1d8
build time: Fri Oct <span class="hljs-number">11</span> <span class="hljs-number">20</span>:<span class="hljs-number">54</span>:<span class="hljs-number">20</span> UTC <span class="hljs-number">2024</span>
build time: Fri Oct <span class="hljs-number">11</span> <span class="hljs-number">21</span>:<span class="hljs-number">36</span>:<span class="hljs-number">31</span> UTC <span class="hljs-number">2024</span>
</code></pre>
<pre><code class="hljs">scalafmt 3.8.3+434-c1c9bbb3-SNAPSHOT
<pre><code class="hljs">scalafmt 3.8.4-RC1
Usage: scalafmt [options] [&lt;<span class="hljs-keyword">file</span>&gt;...]

-<span class="hljs-keyword">h</span>, --<span class="hljs-keyword">help</span> prints this usage text
Expand Down Expand Up @@ -429,7 +429,7 @@ <h2><a class="anchor" aria-hidden="true" id="mill"></a><a href="#mill" aria-hidd
</ul>
<h2><a class="anchor" aria-hidden="true" id="standalone-library"></a><a href="#standalone-library" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Standalone library</h2>
<p>Use the <code>scalafmt-dynamic</code> module to integrate with Scalafmt.</p>
<pre><code class="hljs css language-scala">libraryDependencies += <span class="hljs-string">"org.scalameta"</span> %% <span class="hljs-string">"scalafmt-dynamic"</span> % <span class="hljs-string">"3.8.3"</span>
<pre><code class="hljs css language-scala">libraryDependencies += <span class="hljs-string">"org.scalameta"</span> %% <span class="hljs-string">"scalafmt-dynamic"</span> % <span class="hljs-string">"3.8.4-RC1"</span>
</code></pre>
<p>First, create an instance of <code>Scalafmt</code> and get paths for the file to format
along with it's configuration file.</p>
Expand Down Expand Up @@ -573,7 +573,7 @@ <h3><a class="anchor" aria-hidden="true" id="calling-from-java"></a><a href="#ca
<pre><code class="hljs css language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.scalameta<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>scalafmt-interfaces<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>3.8.3<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>3.8.4-RC1<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
</code></pre>
<p>Next, obtain a classloader with the <code>scalafmt-dynamic_2.12</code> classpath.</p>
Expand All @@ -584,7 +584,7 @@ <h3><a class="anchor" aria-hidden="true" id="calling-from-java"></a><a href="#ca
<span class="hljs-comment">// ClassLoader that shares only org.scalafmt.interfaces from this classloader.</span>
ClassLoader sharedParent = <span class="hljs-keyword">new</span> ScalafmtClassLoader(<span class="hljs-keyword">this</span>.getClass.getClassLoader)

<span class="hljs-comment">// Jars to org.scalameta:scalafmt-dynamic_2.12:3.8.3 classpath. Obtain</span>
<span class="hljs-comment">// Jars to org.scalameta:scalafmt-dynamic_2.12:3.8.4-RC1 classpath. Obtain</span>
<span class="hljs-comment">// these from your build tool or programmatically with ivy/coursier.</span>
URL[] jars = <span class="hljs-comment">// ...</span>
ClassLoader scalafmtDynamic = <span class="hljs-keyword">new</span> URLClassLoader(jars, sharedParent)
Expand Down

0 comments on commit 7b5c67c

Please sign in to comment.