Skip to content

Instantly share code, notes, and snippets.

@ericcitaire
Last active September 9, 2020 12:53
Show Gist options
  • Save ericcitaire/7ced72a7598aec9d8e39aff48fc32fed to your computer and use it in GitHub Desktop.
Save ericcitaire/7ced72a7598aec9d8e39aff48fc32fed to your computer and use it in GitHub Desktop.
Theia IDE

Theia IDE

Installation

Installation Node

En tant que root

export NODE_VERSION=12.18.3
export ARCH=x64

curl -fsSLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz"
tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /opt --no-same-owner

ln -s /opt/node-v12.18.3-linux-x64/bin/node /usr/local/bin/node
ln -s /opt/node-v12.18.3-linux-x64/bin/node /usr/local/bin/nodejs
ln -s /opt/node-v12.18.3-linux-x64/bin/npm /usr/local/bin/npm
ln -s /opt/node-v12.18.3-linux-x64/bin/npx /usr/local/bin/npx

Installation Yarn

En tant que root

export YARN_VERSION=1.13.0

curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz"
tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt

ln -s /opt/yarn-v1.13.0/bin/yarn /usr/local/bin/yarn
ln -s /opt/yarn-v1.13.0/bin/yarnpkg /usr/local/bin/yarnpkg

Installation de Theia

En tant qu'utilisateur

mkdir -p ~/.theia-ide
cd ~/.theia-ide
curl -fsSLo package.json https://raw.githubusercontent.com/theia-ide/theia-apps/master/theia-full-docker/next.package.json
yarn --cache-folder ./ycache && rm -rf ./ycache && NODE_OPTIONS="--max_old_space_size=4096" yarn theia build && yarn theia download:plugins

Lancement de Theia (serveur)

export THEIA_DEFAULT_PLUGINS=local-dir:~/.theia-ide/plugins
node ~/.theia-ide/src-gen/backend/main.js /chemin/du/workspace

Lancement de Theia (client)

chrome --app=http://localhost:3000/#/chemin/du/workspace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment