Skip to content

Commit a9f3e4e

Browse files
authored
Merge pull request #3616 from VirtusLab/stable
Back port of documentation changes to main
2 parents fe00edd + 35702ab commit a9f3e4e

File tree

12 files changed

+114
-0
lines changed

12 files changed

+114
-0
lines changed

modules/directives/src/main/scala/scala/build/preprocessing/directives/CustomJar.scala

+4
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,19 @@ import scala.util.{Failure, Success, Try}
2626
@DirectiveUsage(
2727
"`//> using jar `_path_ | `//> using jars `_path1_ _path2_ …",
2828
"""`//> using jar` _path_
29+
|
2930
|`//> using jars` _path1_ _path2_ …
3031
|
3132
|`//> using test.jar` _path_
33+
|
3234
|`//> using test.jars` _path1_ _path2_ …
3335
|
3436
|`//> using source.jar` _path_
37+
|
3538
|`//> using source.jars` _path1_ _path2_ …
3639
|
3740
|`//> using test.source.jar` _path_
41+
|
3842
|`//> using test.source.jars` _path1_ _path2_ …
3943
|""".stripMargin
4044
)

modules/directives/src/main/scala/scala/build/preprocessing/directives/Dependency.scala

+8
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,27 @@ import scala.cli.commands.SpecificationLevel
3333
@DirectiveUsage(
3434
"//> using dep org:name:ver | //> using deps org:name:ver org2:name2:ver2",
3535
"""`//> using dep` _org_`:`name`:`ver
36+
|
3637
|`//> using deps` _org_`:`name`:`ver _org_`:`name`:`ver
38+
|
3739
|`//> using dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
3840
|
3941
|`//> using test.dep` _org_`:`name`:`ver
42+
|
4043
|`//> using test.deps` _org_`:`name`:`ver _org_`:`name`:`ver
44+
|
4145
|`//> using test.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
4246
|
4347
|`//> using compileOnly.dep` _org_`:`name`:`ver
48+
|
4449
|`//> using compileOnly.deps` _org_`:`name`:`ver _org_`:`name`:`ver
50+
|
4551
|`//> using compileOnly.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
4652
|
4753
|`//> using scalafix.dep` _org_`:`name`:`ver
54+
|
4855
|`//> using scalafix.deps` _org_`:`name`:`ver _org_`:`name`:`ver
56+
|
4957
|`//> using scalafix.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
5058
|""".stripMargin
5159
)

modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaProps.scala

+2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ import scala.cli.commands.SpecificationLevel
1414
@DirectiveUsage(
1515
"//> using javaProp _key=val_",
1616
"""`//> using javaProp` _key=value_
17+
|
1718
|`//> using javaProp` _key_
1819
|
1920
|`//> using test.javaProp` _key=value_
21+
|
2022
|`//> using test.javaProp` _key_
2123
|""".stripMargin
2224
)

modules/directives/src/main/scala/scala/build/preprocessing/directives/JavacOptions.scala

+2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ import scala.cli.commands.SpecificationLevel
1313
@DirectiveUsage(
1414
"//> using javacOpt _options_",
1515
"""`//> using javacOpt` _options_
16+
|
1617
|`//> using javacOptions` _options_
1718
|
1819
|`//> using test.javacOpt` _options_
20+
|
1921
|`//> using test.javacOptions` _options_
2022
|""".stripMargin
2123
)

modules/directives/src/main/scala/scala/build/preprocessing/directives/Platform.scala

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import scala.cli.commands.SpecificationLevel
2525
@DirectiveUsage(
2626
"//> using platform (jvm|scala-js|js|scala-native|native)+",
2727
"""`//> using platform` (`jvm`|`scala-js`|`js`|`scala-native`|`native`)+
28+
|
2829
|`//> using platforms` (`jvm`|`scala-js`|`js`|`scala-native`|`native`)+
2930
|""".stripMargin
3031
)

modules/directives/src/main/scala/scala/build/preprocessing/directives/Publish.scala

+3
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ import scala.cli.commands.SpecificationLevel
4343
|`//> using publish.license` value
4444
|
4545
|`//> using publish.vcs` value
46+
|
4647
|`//> using publish.scm` value
48+
|
4749
|`//> using publish.versionControl` value
4850
|
4951
|`//> using publish.description` value
5052
|
5153
|`//> using publish.developer` value
54+
|
5255
|`//> using publish.developers` value1 value2
5356
|
5457
|`//> using publish.scalaVersionSuffix` value

modules/directives/src/main/scala/scala/build/preprocessing/directives/Resources.scala

+2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ import scala.cli.commands.SpecificationLevel
1515
|
1616
|//> using resourceDirs _path1_ _path2_ …""".stripMargin,
1717
"""`//> using resourceDir` _path_
18+
|
1819
|`//> using resourceDirs` _path1_ _path2_ …
1920
|
2021
|`//> using test.resourceDir` _path_
22+
|
2123
|`//> using test.resourceDirs` _path1_ _path2_ …
2224
|
2325
|""".stripMargin

modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaJs.scala

+8
Original file line numberDiff line numberDiff line change
@@ -37,39 +37,47 @@ import scala.util.Try
3737
|`//> using jsMode` _value_
3838
|
3939
|`//> using jsNoOpt` _true|false_
40+
|
4041
|`//> using jsNoOpt`
4142
|
4243
|`//> using jsModuleKind` _value_
4344
|
4445
|`//> using jsCheckIr` _true|false_
46+
|
4547
|`//> using jsCheckIr`
4648
|
4749
|`//> using jsEmitSourceMaps` _true|false_
50+
|
4851
|`//> using jsEmitSourceMaps`
4952
|
5053
|`//> using jsEsModuleImportMap` _value_
5154
|
5255
|`//> using jsSmallModuleForPackage` _value1_ _value2_ …
5356
|
5457
|`//> using jsDom` _true|false_
58+
|
5559
|`//> using jsDom`
5660
|
5761
|`//> using jsHeader` _value_
5862
|
5963
|`//> using jsAllowBigIntsForLongs` _true|false_
64+
|
6065
|`//> using jsAllowBigIntsForLongs`
6166
|
6267
|`//> using jsAvoidClasses` _true|false_
68+
|
6369
|`//> using jsAvoidClasses`
6470
|
6571
|`//> using jsAvoidLetsAndConsts` _true|false_
72+
|
6673
|`//> using jsAvoidLetsAndConsts`
6774
|
6875
|`//> using jsModuleSplitStyleStr` _value_
6976
|
7077
|`//> using jsEsVersionStr` _value_
7178
|
7279
|`//> using jsEmitWasm` _true|false_
80+
|
7381
|`//> using jsEmitWasm`
7482
|""".stripMargin
7583
)

modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaNative.scala

+3
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,17 @@ import scala.cli.commands.SpecificationLevel
3838
|`//> using nativeClang` _value_
3939
|
4040
|`//> using nativeClangPP` _value_
41+
|
4142
|`//> using nativeClangPp` _value_
4243
|
4344
|`//> using nativeEmbedResources` _true|false_
45+
|
4446
|`//> using nativeEmbedResources`
4547
|
4648
|`//> using nativeTarget` _application|library-dynamic|library-static_
4749
|
4850
|`//> using nativeMultithreading` _true|false_
51+
|
4952
|`//> using nativeMultithreading`
5053
""".stripMargin.trim
5154
)

modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalacOptions.scala

+6
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,19 @@ import scala.cli.commands.SpecificationLevel
2222
@DirectiveUsage(
2323
"using option _option_ | using options _option1_ _option2_ …",
2424
"""`//> using scalacOption` _option_
25+
|
2526
|`//> using option` _option_
27+
|
2628
|`//> using scalacOptions` _option1_ _option2_ …
29+
|
2730
|`//> using options` _option1_ _option2_ …
2831
|
2932
|`//> using test.scalacOption` _option_
33+
|
3034
|`//> using test.option` _option_
35+
|
3136
|`//> using test.scalacOptions` _option1_ _option2_ …
37+
|
3238
|`//> using test.options` _option1_ _option2_ …
3339
|
3440
|""".stripMargin

website/docs/reference/directives.md

+39
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,19 @@ Generate BuildInfo for project
3434
Add Scala compiler options
3535

3636
`//> using scalacOption` _option_
37+
3738
`//> using option` _option_
39+
3840
`//> using scalacOptions` _option1_ _option2_
41+
3942
`//> using options` _option1_ _option2_
4043

4144
`//> using test.scalacOption` _option_
45+
4246
`//> using test.option` _option_
47+
4348
`//> using test.scalacOptions` _option1_ _option2_
49+
4450
`//> using test.options` _option1_ _option2_
4551

4652

@@ -81,15 +87,19 @@ Method used to compute the version for BuildInfo
8187
Manually add JAR(s) to the class path
8288

8389
`//> using jar` _path_
90+
8491
`//> using jars` _path1_ _path2_
8592

8693
`//> using test.jar` _path_
94+
8795
`//> using test.jars` _path1_ _path2_
8896

8997
`//> using source.jar` _path_
98+
9099
`//> using source.jars` _path1_ _path2_
91100

92101
`//> using test.source.jar` _path_
102+
93103
`//> using test.source.jars` _path1_ _path2_
94104

95105

@@ -121,19 +131,27 @@ Manually add sources to the project. Does not support chaining, sources are adde
121131
Add dependencies
122132

123133
`//> using dep` _org_`:`name`:`ver
134+
124135
`//> using deps` _org_`:`name`:`ver _org_`:`name`:`ver
136+
125137
`//> using dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
126138

127139
`//> using test.dep` _org_`:`name`:`ver
140+
128141
`//> using test.deps` _org_`:`name`:`ver _org_`:`name`:`ver
142+
129143
`//> using test.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
130144

131145
`//> using compileOnly.dep` _org_`:`name`:`ver
146+
132147
`//> using compileOnly.deps` _org_`:`name`:`ver _org_`:`name`:`ver
148+
133149
`//> using compileOnly.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
134150

135151
`//> using scalafix.dep` _org_`:`name`:`ver
152+
136153
`//> using scalafix.deps` _org_`:`name`:`ver _org_`:`name`:`ver
154+
137155
`//> using scalafix.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
138156

139157

@@ -209,9 +227,11 @@ Add Java options which will be passed when running an application.
209227
Add Java properties
210228

211229
`//> using javaProp` _key=value_
230+
212231
`//> using javaProp` _key_
213232

214233
`//> using test.javaProp` _key=value_
234+
215235
`//> using test.javaProp` _key_
216236

217237

@@ -225,9 +245,11 @@ Add Java properties
225245
Add Javac options which will be passed when compiling sources.
226246

227247
`//> using javacOpt` _options_
248+
228249
`//> using javacOptions` _options_
229250

230251
`//> using test.javacOpt` _options_
252+
231253
`//> using test.javacOptions` _options_
232254

233255

@@ -304,6 +326,7 @@ Set parameters for packaging
304326
Set the default platform to Scala.js or Scala Native
305327

306328
`//> using platform` (`jvm`|`scala-js`|`js`|`scala-native`|`native`)+
329+
307330
`//> using platforms` (`jvm`|`scala-js`|`js`|`scala-native`|`native`)+
308331

309332

@@ -329,12 +352,15 @@ Set parameters for publishing
329352
`//> using publish.license` value
330353

331354
`//> using publish.vcs` value
355+
332356
`//> using publish.scm` value
357+
333358
`//> using publish.versionControl` value
334359

335360
`//> using publish.description` value
336361

337362
`//> using publish.developer` value
363+
338364
`//> using publish.developers` value1 value2
339365

340366
`//> using publish.scalaVersionSuffix` value
@@ -447,9 +473,11 @@ Accepts predefined repositories supported by Coursier (like `sonatype:snapshots`
447473
Manually add a resource directory to the class path
448474

449475
`//> using resourceDir` _path_
476+
450477
`//> using resourceDirs` _path1_ _path2_
451478

452479
`//> using test.resourceDir` _path_
480+
453481
`//> using test.resourceDirs` _path1_ _path2_
454482

455483

@@ -478,14 +506,17 @@ Add Scala Native options
478506
`//> using nativeClang` _value_
479507

480508
`//> using nativeClangPP` _value_
509+
481510
`//> using nativeClangPp` _value_
482511

483512
`//> using nativeEmbedResources` _true|false_
513+
484514
`//> using nativeEmbedResources`
485515

486516
`//> using nativeTarget` _application|library-dynamic|library-static_
487517

488518
`//> using nativeMultithreading` _true|false_
519+
489520
`//> using nativeMultithreading`
490521

491522
#### Examples
@@ -540,39 +571,47 @@ Add Scala.js options
540571
`//> using jsMode` _value_
541572

542573
`//> using jsNoOpt` _true|false_
574+
543575
`//> using jsNoOpt`
544576

545577
`//> using jsModuleKind` _value_
546578

547579
`//> using jsCheckIr` _true|false_
580+
548581
`//> using jsCheckIr`
549582

550583
`//> using jsEmitSourceMaps` _true|false_
584+
551585
`//> using jsEmitSourceMaps`
552586

553587
`//> using jsEsModuleImportMap` _value_
554588

555589
`//> using jsSmallModuleForPackage` _value1_ _value2_
556590

557591
`//> using jsDom` _true|false_
592+
558593
`//> using jsDom`
559594

560595
`//> using jsHeader` _value_
561596

562597
`//> using jsAllowBigIntsForLongs` _true|false_
598+
563599
`//> using jsAllowBigIntsForLongs`
564600

565601
`//> using jsAvoidClasses` _true|false_
602+
566603
`//> using jsAvoidClasses`
567604

568605
`//> using jsAvoidLetsAndConsts` _true|false_
606+
569607
`//> using jsAvoidLetsAndConsts`
570608

571609
`//> using jsModuleSplitStyleStr` _value_
572610

573611
`//> using jsEsVersionStr` _value_
574612

575613
`//> using jsEmitWasm` _true|false_
614+
576615
`//> using jsEmitWasm`
577616

578617

0 commit comments

Comments
 (0)