When we create a new Kotlin project, there are several ways to go about setting up that project and defining a compilation target. Throughout this book, we've primarily been working within IntelliJ IDEA to create new Kotlin projects and modules. Those projects have all targeted the JVM and have had minimal dependencies, so the actual project creation aspect hasn't been that interesting.
Now that we're considering how to create a Kotlin project that target's JavaScript, we can consider multiple means of creating a Kotlin project. In practice, there are the following four ways we could go about creating a new Kotlin project with a JavaScript target:
- Building with Gradle
- Building with Maven
- Building within IntelliJ IDEA
- Building from the command line
In the next section of this chapter, Building a Hello Kotlin project, we will walk through how to set up a new Kotlin project using IntelliJ IDEA and make that project target JavaScript so that our Kotlin code can be consumed within a simple web app. Before continuing on to creating our own project, let's explore how and where we can integrate our transpiled Kotlin code.