スポンサーリンク

『Elixir/Phoenix 初級①』を写経する(5)第11章

前回は、第10章をやってみた。

http://twosquirrel.mints.ne.jp/?p=14642

今回は、引き続き、以下の本の、第11章を写経していく。

 

(環境)
Windows 8.1
VirtualBox 5.1.14
Vagrant 1.9.1
CentOS7.3
Erlang/OTP 19
Elixir 1.3.4
Phoenix 1.2.1
Postgresql 9.2.18
Node.js 6.9.5

(1)Bootstrapの導入

windowsからVagrantでLinux仮想マシンを動かしているときは、npm install するときに、

–-no-bin-links

を入れることが大事。

cd /vagrant/modest_greeter
npm install --save --no-bin-links tether bootstrap@4.0.0-alpha.6

image

(2)スタイルシートの設定

(不要らしい。。。)

(3)JavaScriptの設定

web/static/js/app.js

image

(4)Brunchの設定

brunch-config.js

image

(5)Cardコンポーネント

web/templates/hello/show.html.eex

image

mix phoenix.server

http://localhost:4000/hello

image

んん?なんかだめそう

一度、Ctrl+C 2回でserverを止めてから、

node node_modules/brunch/bin/brunch build

image

もう一度、

mix phoenix.server

だめだった。

やはり、

(2)スタイルシートの設定

image

node node_modules/brunch/bin/brunch build

 

web/templates/hello/show.html.eex

image

 

mix phoenix.server

image

なんとかカードはできたようではある。

なかなかうまくいかない。

スポンサーリンク