eclipse Theia のインストール - dev-kiyoharu/test GitHub Wiki
以下を参考にインストールしました。
https://qiita.com/woolk23/items/0ed23957f0b6cdc1321b
https://theia-ide.org/docs/composing_applications
実際に行った手順
nodejsのインストール
以下を参考にしました。
https://qiita.com/seibe/items/36cef7df85fe2cefa3ea
まず普通に nodejs, npm をインストールします。
$ sudo apt install -y nodejs npm
次に n package を導入します。
$ sudo npm install n -g
n package を使って node の安定版をインストールします。
$ sudo n stable
PATHや環境変数を再読み込みするためにシェルを実行し直します。
$ exec $SHELL -l
n package を使って node の v10.11 をインストールします。
eclipse Theia のインストール・ビルドには nodejs のバージョンが 10 < x < 12 なので、
今回は、v10.11.0 にします。
$ sudo n 10.11
yarn のインストール
npm install -g yarn
python のバージョンが 2.x 以上かチェック
$ python --version
作業用のディレクトリを作成
$ mkdir Theia
$ cd Theia
以下の内容で package.json を作成
{
"private": true,
"dependencies": {
"@theia/callhierarchy": "next",
"@theia/file-search": "next",
"@theia/git": "next",
"@theia/json": "next",
"@theia/markers": "next",
"@theia/messages": "next",
"@theia/mini-browser": "next",
"@theia/navigator": "next",
"@theia/outline-view": "next",
"@theia/plugin-ext-vscode": "next",
"@theia/preferences": "next",
"@theia/preview": "next",
"@theia/search-in-workspace": "next",
"@theia/terminal": "next"
},
"devDependencies": {
"@theia/cli": "next"
}
}
ビルド
yarn
yarn theia build
実行
ワークスペース(作業場所ディレクトリ)を指定できますので、何か適当に作ってそこを引数として指定します。ファイル選択はそのディレクトリが起点になりますが、上位に移動できますので、あくまでも便利というだけです。例えばこんな感じ。
yarn theia start ~/workspace —hostname example.com —port 8080
これで起動したサーバにブラウザでhttp://example.com:8080などとするとTheiaが使えます。ターミナル機能もあるので、ファイル編集はもちろん、CUIの操作も可能です。