Skip to content

Commit 7f40d24

Browse files
update: Review of Kotlin/JS continuous mode
1 parent 44fdfde commit 7f40d24

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed
Binary file not shown.
Binary file not shown.
157 KB
Loading
-166 KB
Loading
-83.9 KB
Loading
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +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 `jsBrowserDevelopmentRun` (for `browser`) and `jsNodeDevelopmentRun` (for `nodejs`) 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-
# for `browser` project
8+
# For `browser` project
99
./gradlew jsBrowserDevelopmentRun --continuous
1010

11-
# for `nodejs` project
11+
# For `nodejs` project
1212
./gradlew jsNodeDevelopmentRun --continuous
1313
```
1414

15-
If you are working in IntelliJ IDEA, you can pass the same flag via the _run configuration_. After running the Gradle
16-
run task for the first time from the IDE, IntelliJ IDEA automatically generates a run configuration for it,
17-
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:
1818

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

21-
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
2222
arguments for the run configuration:
2323

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

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

30-
Once a change has been detected, the program will be recompiled automatically. If you still have the page open in the browser,
31-
the development server will trigger an automatic reload of the page, and the changes will become visible.
32-
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)