Kilua guide
  • Kilua Guide
  • Introduction
  • Compose world
  • 1. Getting Started
    • Setting Up
    • Creating a New Application
    • Modules
    • Development Workflow
    • Hot Module Replacement
    • Debugging
    • Building For Production
  • 2. Frontend Development Guide
    • Composable functions
    • Browser APIs
    • Interoperability with JavaScript
    • Working with Compose
    • Rendering HTML
    • Type-safe CSS properties
    • Resources
    • Icons
    • Routing
    • Layout containers
    • Events
    • Forms
    • Form controls
    • SVG images
    • Drag and drop
    • Internationalization
    • REST client
    • Markdown and sanitization
    • Using Bootstrap
    • Using TailwindCSS
    • Using Tabulator
    • Animation
    • Using Jetpack Compose API
  • 3. Fullstack Components
  • Useful References
Powered by GitBook
On this page
  1. 1. Getting Started

Development Workflow

PreviousModulesNextHot Module Replacement

Last updated 2 months ago

To run the application with Gradle continuous build, enter one of these commands:

./gradlew -t jsBrowserDevelopmentRun                 (run Js target on Linux)
./gradlew -t wasmJsBrowserDevelopmentRun             (run WasmJs target on Linux)
gradlew.bat -t jsBrowserDevelopmentRun               (run Js target on Windows)
gradlew.bat -t wasmJsBrowserDevelopmentRun           (run WasmJs target on Windows)

You can choose whether you want to develop Js or WasmJs version of your application without any code changes. In general it's recommended to develop with Js target, because the Kotlin/JS compiler is a lot faster and also HMR is fully supported.

After Gradle finishes downloading dependencies and building the application, open in your favourite browser.

You can import the project in IntelliJ IDEA and open src/commonMain/kotlin/main.kt file. You can of course use your favourite text editor.

Make some code changes in the start function:

main.kt
override fun start() {
    root("root") {
        div {
            +"Hello Kilua!"
        }
    }
}

You should see your changes immediately in the browser.

http://localhost:3000/