Skip to content

Commit 29812ab

Browse files
bidrohiAlejandraPedroza
authored andcommitted
Update js-project-setup.md
Fix flipped example in Kotlin vs Groovy
1 parent 840c425 commit 29812ab

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/topics/js/js-project-setup.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -666,19 +666,19 @@ To use a pre-installed Node.js instance, add the following lines to your `build.
666666
<tab title="Kotlin" group-key="kotlin">
667667

668668
```kotlin
669-
project.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsPlugin) {
669+
project.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsPlugin> {
670670
// Set to `true` for default behavior
671-
project.extensions.getByType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec).download = false
671+
project.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().download = false
672672
}
673673
```
674674

675675
</tab>
676676
<tab title="Groovy" group-key="groovy">
677677

678678
```groovy
679-
project.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsPlugin> {
679+
project.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsPlugin) {
680680
// Set to `true` for default behavior
681-
project.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().download = false
681+
project.extensions.getByType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec).download = false
682682
}
683683
```
684684

@@ -807,7 +807,7 @@ To use these options, update `build.gradle(.kts)` as follows:
807807
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnLockMismatchReport
808808
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension
809809

810-
rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin::class.java) {
810+
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin> {
811811
rootProject.the<YarnRootExtension>().yarnLockMismatchReport =
812812
YarnLockMismatchReport.WARNING // NONE | FAIL
813813
rootProject.the<YarnRootExtension>().reportNewYarnLock = false // true

0 commit comments

Comments
 (0)