LoginSignup
6
4

More than 5 years have passed since last update.

【環境構築】KotlinでReactのWebアプリを作る

Last updated at Posted at 2017-11-03

概要

Kotlin/JSでReactしたいと思っていたところ、create-react-kotlin-appの存在を知ったので動かしてみました。

環境

ツール バージョン
node v9.0.0
npm 5.5.1
create-react-kotlin-app 1.0.4
IntelliJ 2017.3 EAP (Ultimate Edition)

※ nodeはnodebrewでインストールしました。
※ npmのビルドをIDE上で実行するには、IntelliJのUltimate Editionが必要です。今回はFree trial版で。

インストールとアプリ生成

こちらの通りです。
https://github.com/JetBrains/create-react-kotlin-app#quick-overview

コマンド一発で初期アプリの構築が完了です。(簡単!)
$ create-react-kotlin-app my-app

Run/Debug Configuration (IntelliJのRun設定)

設定項目
package.json path-to-project/package.json
Command start
Arguments --scripts-prepend-node-path
Node interporeter ~/.nodebrew/node/v9.0.0/bin/node

ビルド

IntelliJでRunすると、localhost:3000で起動して、以下のような初期画面が表示されます。

スクリーンショット 2017-11-03 20.04.52.png

まとめ

今回は、環境構築してRunするところまで書きました。
次は何か作ってみたいと思います。

6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4