Skip to content

Commit

Permalink
Merge pull request JetBrains#3559 from JetBrains/minimize-kotlin-js
Browse files Browse the repository at this point in the history
update: update Kotlin/JS docs
  • Loading branch information
danil-pavlov authored May 15, 2023
2 parents 944d101 + 391bd49 commit f3055be
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 406 deletions.
Binary file removed docs/images/get-started/js-new-project-1.png
Binary file not shown.
Binary file removed docs/images/get-started/js-new-project-2.png
Binary file not shown.
8 changes: 3 additions & 5 deletions docs/kr.tree
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<toc-element id="multiplatform-get-started.md" accepts-web-file-names="building-mpp-with-gradle.html,intro-to-kotlin-mpp.html,mpp-intro.html,mpp-get-started.html,multiplatform-tutorials.html"/>
<toc-element id="multiplatform-discover-project.md" accepts-web-file-names="mpp-discover-project.html"/>
<toc-element id="multiplatform-set-up-targets.md" toc-title="Set up targets manually" accepts-web-file-names="mpp-set-up-targets.html"/>
<toc-element id="multiplatform-full-stack-app.md"/>
<toc-element id="multiplatform-full-stack-app.md" hidden="true"/>
</toc-element>
<toc-element toc-title="Creating multiplatform libraries">
<toc-element id="multiplatform-library.md" accepts-web-file-names="working-with-klib.html,multiplatform-create-lib.html,mpp-create-lib.html"/>
Expand Down Expand Up @@ -244,8 +244,7 @@

<toc-element toc-title="JavaScript">

<toc-element id="js-get-started.md" accepts-web-file-names="setting-up.html,kotlin-to-javascript.html,create-library-js.html,getting-started-with-intellij-idea.html,getting-started-with-maven.html"/>
<toc-element id="js-project-setup.md" accepts-web-file-names="command-line-library-js.html,working-with-javascript.html"/>
<toc-element id="js-project-setup.md" accepts-web-file-names="command-line-library-js.html,working-with-javascript.html,setting-up.html,kotlin-to-javascript.html,create-library-js.html,getting-started-with-intellij-idea.html,getting-started-with-maven.html"/>
<toc-element id="running-kotlin-js.md"/>
<toc-element id="dev-server-continuous-compilation.md"/>
<toc-element id="js-debugging.md" accepts-web-file-names="debugging-kotlin-in-browser.html"/>
Expand All @@ -264,8 +263,7 @@
<toc-element id="js-reflection.md"/>
<toc-element id="typesafe-html-dsl.md"/>
</toc-element>
<toc-element id="js-samples.md" toc-title="Samples"/>
<toc-element id="js-react.md"/>
<toc-element id="js-react.md" hidden="true"/>
</toc-element>

<toc-element toc-title="Scripting">
Expand Down
5 changes: 1 addition & 4 deletions docs/topics/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ For more information, check out [the resource on server-side development](server

### Can I use Kotlin for web development?

Yes. In addition to using for backend web, you can also use Kotlin/JS for client-side web. Kotlin can use definitions from
[DefinitelyTyped](https://definitelytyped.org) to get static typing for common JavaScript libraries, and it is compatible
with existing module systems such as AMD and CommonJS.
For more information, check out [the resource on client-side development](js-overview.md).
Yes. In addition to using for backend web, you can also use Kotlin/Wasm for client-side web. Learn how to [get started with Kotlin/Wasm](wasm-get-started.md).

### Can I use Kotlin for desktop development?

Expand Down
59 changes: 7 additions & 52 deletions docs/topics/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,49 +118,6 @@ If you've encountered any difficulties or problems, report an issue to our [issu

</tab>

<tab id="frontend" title="Frontend web app">

Kotlin provides an ability to transpile your Kotlin code, the Kotlin standard library, and any compatible dependencies to JavaScript.

Here you'll learn how to develop and improve your frontend web application using [Kotlin/JS](js-overview.md).

1. **Create your first frontend web application:**

* To start from scratch, [create a basic browser application with the IntelliJ IDEA project wizard](js-project-setup.md).
* If you prefer more robust examples, complete the [Build a web application with React and Kotlin/JS](js-react.md) tutorial. It includes a sample project that can serve as a good starting point for your own projects, and contains useful snippets and templates.
* Check out the list of [Kotlin/JS samples](js-samples.md) for more ideas on how to use Kotlin/JS.

2. **Use libraries in your application.** Learn more about [adding dependencies](js-project-setup.md#dependencies).

|Library | Details |
|--------|---------|
|[stdlib](https://kotlinlang.org/api/latest/jvm/stdlib/) | The Kotlin standard library included in all projects by default. |
|[kotlinx.browser](browser-api-dom.md)| The Kotlin library for accessing browser-specific functionality, including typical top-level objects such as document and window. |
|[kotlinx.html](typesafe-html-dsl.md) | The Kotlin library for generating DOM elements using statically-typed HTML builders.|
|[Ktor](https://ktor.io/) | The Kotlin multiplatform library for networking. |
|[KVision](https://kvision.io/) | A third-party object-oriented web framework for Kotlin/JS.|
|[fritz2](https://www.fritz2.dev/)| A third-party lightweight, high-performance, independent library for building reactive web apps in Kotlin that are heavily dependent on coroutines and flows.|
|[Doodle](https://nacular.github.io/doodle/) | A third-party vector-based UI framework that uses browser's capabilities to draw user interfaces.|
|Compose for Web, a part of [Compose Multiplatform](https://www.jetbrains.com/lp/compose-mpp/) | The JetBrains framework that brings [Google's Jetpack Compose UI toolkit](https://developer.android.com/jetpack/compose) to the browser. |
|[kotlin-wrappers](https://github.com/JetBrains/kotlin-wrappers) | Provide convenient abstractions and deep integrations for one of the most popular JavaScript frameworks. Kotlin wrappers also provide support for a number of adjacent technologies like `react-redux`, `react-router`, or `styled-components`. |

3. **Learn more about Kotlin for frontend web development:**

* The [new Kotlin/JS IR compiler](js-ir-compiler.md).
* [Using dependencies from npm](using-packages-from-npm.md).
* [Using Kotlin code from JavaScript](js-to-kotlin-interop.md).

4. **Join the Kotlin frontend web community:**

* ![Slack](slack.svg){width=25}{type="joined"} Slack: [get an invite](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up) and join the [#getting-started](https://kotlinlang.slack.com/archives/C0B8MA7FA) and [#javascript](https://kotlinlang.slack.com/archives/C0B8L3U69) channels.
* ![StackOverflow](stackoverflow.svg){width=25}{type="joined"} StackOverflow: subscribe to the ["kotlin-js" tag](https://stackoverflow.com/questions/tagged/kotlin-js).

5. **Follow Kotlin** on ![Twitter](twitter.svg){width=25}{type="joined"} [Twitter](https://twitter.com/kotlin), ![Reddit](reddit.svg){width=25}{type="joined"} [Reddit](https://www.reddit.com/r/Kotlin/), and ![YouTube](youtube.svg){width=25}{type="joined"} [Youtube](https://www.youtube.com/channel/UCP7uiEZIqci43m22KDl0sNw), and don't miss any important ecosystem updates.

If you've encountered any difficulties or problems, report an issue to our [issue tracker](https://youtrack.jetbrains.com/issues/KT).

</tab>

<tab id="android" title="Android app">

* If you want to start using Kotlin for Android development, read [Google's recommendation for getting started with Kotlin on Android](https://developer.android.com/kotlin/get-started).
Expand All @@ -180,17 +137,15 @@ Here you'll learn how to develop and publish a multiplatform library:
1. **Create a multiplatform library:**

* Complete the [Create and publish a multiplatform library](multiplatform-library.md) tutorial. It shows how to create a multiplatform library for JVM, JS, and Native platforms, test it and publish to a local Maven repository.
* Build a full stack web application using [this tutorial](multiplatform-full-stack-app.md).

2. **Use libraries in your application.** Learn more about [adding dependencies on libraries](multiplatform-add-dependencies.md).
2. **Use libraries in your application:**

|Library| Details |
|---------------------------------------------------------------------------------------------------------|-------|
| Ktor | [Docs](https://ktor.io/docs/) and [sample](multiplatform-full-stack-app.md#build-the-backend). |
| Serialization | [Docs](serialization.md) and [sample](multiplatform-full-stack-app.md). |
| Coroutines | [Docs](coroutines-overview.md). |
| DateTime | [Docs](https://github.com/Kotlin/kotlinx-datetime#readme). |

* [Ktor](https://ktor.io/docs/)
* [Serialization](serialization.md)
* [Coroutines](coroutines-overview.md)
* [DateTime](https://github.com/Kotlin/kotlinx-datetime#readme)

> Learn more about [adding dependencies on libraries](multiplatform-add-dependencies.md).
> You can also find a multiplatform library in the [community-driven list](https://libs.kmp.icerock.dev/).
>
{type="tip"}
Expand Down
159 changes: 0 additions & 159 deletions docs/topics/js/js-get-started.md

This file was deleted.

Loading

0 comments on commit f3055be

Please sign in to comment.