LoginSignup
0
0

More than 3 years have passed since last update.

Ubuntu20.4でelectron-react-boilerplateを使うための準備

Last updated at Posted at 2020-12-13

Ubuntu 20.4にまるっきり1からelectron-react-boilerplate(ERB)の環境構築をしたので、せっかくなのでメモしておきます

やることリスト

  • Node.jsのインストール
  • curlのインストール
  • yarnのインストール
  • gitのインストール
  • ERBのクローン
  • 動くか確認

Node.jsのインストール

ローカルパッケージインデックスの更新

sudo apt update

Node.jsのインストール

sudo apt install nodejs

インストールできたか確認する

nodejs -v

ついでにnpmもインストールしておく

sudo apt install npm

Node.jsのインストールは以上。

<参考>
Ubuntu 20.04にNode.jsをインストールする方法

curlのインストール

yarnのインストールに必要なので、curlのインストールをする。
以下コマンドでインストール。

sudo apt install curl

curlのインストール終わり。

yarnのインストール

Debianパッケージリポジトリの設定

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

yarnのインストール

sudo apt-get update && sudo apt-get install yarn

yarnのインストール終わり。

<参考>
インストール | Yarn

gitのインストール

以下コマンドでインストール

sudo apt-get install git

インストールされたか確認する

dpkg -l git

ERBのクローン

以下コマンドでインストール

git clone --depth 1 --single-branch https://github.com/electron-react-boilerplate/electron-react-boilerplate.git your-project-name

your-project-nameに自分の好きな名前を入れる。

ディレクトリを変更してyarnする

cd your-project-name

yarn

<参考>

GitHub - electron-react-boilerplate/electron-react-boilerplate: A Foundation for Scalable Cross-Platform Apps

動くか確認する

以下コマンドで実行

yarn start

画像のように表示されればOK。

(12/11にERBがv2.0.0になり、以前までのCounterページがなくなりました。詳しくは別で書こうと思います。)

Screenshot from 2020-12-12 17-11-03.png

(自分の転載です。)

0
0
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
0
0