Skip to content

Commit 41cf519

Browse files
Fix task names in the continuous compilation doc (#4931)
* Fix task names in the `continuous compilation` doc * update: Review of Kotlin/JS continuous mode * chore: fix screenshot border --------- Co-authored-by: alepedroza <[email protected]>
1 parent b1d936f commit 41cf519

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed
Binary file not shown.
Binary file not shown.
158 KB
Loading
-166 KB
Loading
-83.9 KB
Loading
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
[//]: # (title: Development server and continuous compilation)
22

3-
Instead of manually compiling and executing a Kotlin/JS project every time you want to see the changes you made,
4-
you can use the _continuous compilation_ mode. Instead of using the regular `run` command, invoke the Gradle wrapper
5-
in _continuous_ mode:
3+
Instead of manually compiling and running your Kotlin/JS project each time you want to see the changes you made,
4+
you can use the _continuous compilation_ mode. Rather than using the regular `jsBrowserDevelopmentRun` (for `browser`) and `jsNodeDevelopmentRun` (for `nodejs`) command, invoke the Gradle wrapper
5+
in continuous mode:
66

77
```bash
8-
./gradlew run --continuous
8+
# For `browser` project
9+
./gradlew jsBrowserDevelopmentRun --continuous
10+
11+
# For `nodejs` project
12+
./gradlew jsNodeDevelopmentRun --continuous
913
```
1014

11-
If you are working in IntelliJ IDEA, you can pass the same flag via the _run configuration_. After running the Gradle
12-
`run` task for the first time from the IDE, IntelliJ IDEA automatically generates a run configuration for it,
13-
which you can edit:
15+
If you are working in IntelliJ IDEA, you can pass the same flag via the list of run configurations. After running the
16+
`jsBrowserDevelopmentRun` Gradle task for the first time from the IDE, IntelliJ IDEA automatically generates a run configuration for it,
17+
which you can edit at the top toolbar:
1418

1519
![Editing run configurations in IntelliJ IDEA](edit-configurations.png){width=700}
1620

17-
Enabling continuous mode via the **Run/Debug Configurations** dialog is as easy as adding the `--continuous` flag to the
21+
Enable continuous mode via the **Run/Debug Configurations** dialog by adding the `--continuous` flag to the
1822
arguments for the run configuration:
1923

2024
![Adding the continuous flag to a run configuration in IntelliJ IDEA](run-debug-configurations.png){width=700}
@@ -23,6 +27,6 @@ When executing this run configuration, you can note that the Gradle process cont
2327

2428
![Gradle waiting for changes](waiting-for-changes.png){width=700}
2529

26-
Once a change has been detected, the program will be recompiled automatically. If you still have the page open in the browser,
27-
the development server will trigger an automatic reload of the page, and the changes will become visible.
28-
This is thanks to the integrated `webpack-dev-server` that is managed by the Kotlin Multiplatform Gradle plugin.
30+
Once a change has been detected, the program is recompiled automatically. If you still have the web page open in the browser,
31+
the development server triggers an automatic reload of the page, and the changes become visible.
32+
This is thanks to the integrated [`webpack-dev-server`](https://webpack.js.org/configuration/dev-server/) that is managed by the [Kotlin Multiplatform Gradle plugin](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-dsl-reference.html).

0 commit comments

Comments
 (0)