Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
VueCLI3がうまちわるい
Search
果物リン
September 22, 2018
550
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
VueCLI3がうまちわるい
VueCLI3がめっちゃすごいよ!今までライブラリ追加とかで悩んでた人がきもちわるいくらいに!(褒めてる
果物リン
September 22, 2018
More Decks by 果物リン
See All by 果物リン
AIに与える人間らしさを(略)したら600ページの同人誌になった/I kept thinking about making AI more human, more, more, more... wait, when did this become a 600-page doujinshi?
fruitriin
0
120
記憶を高速で思い出す全文検索パフォーマンス・チューニング テクニック/How to make your AI recall, quickly
fruitriin
0
82
入社半年で作った"社内でも使える"ツール集/Everything I Built on the Side in Half a Year
fruitriin
0
95
embodied記憶の依代 聖杯問答/ Vessel of Memory: The Grail Dialogue #embodied_llm
fruitriin
2
180
ClaudeCodeと遠くへいくためのパーミッションルール/Stop Checking, Start Trusting: Claude Code Permission Rules
fruitriin
0
67
Claude Codeと物忘れ / Invitation talk about context - Why Claude Code forget?
fruitriin
0
91
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
250
Electron+Vue+Swift=真のデスクトップアプリ / How to create "Really" desktop app using Electron
fruitriin
0
130
ある日オレオレフレームワークを作りたくなったぞ/Want to Create Oreore Framework
fruitriin
1
180
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Rails Girls Zürich Keynote
gr2m
96
14k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
How to train your dragon (web standard)
notwaldorf
97
6.7k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
Mind Mapping
helmedeiros
PRO
1
260
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
170
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
210
Six Lessons from altMBA
skipperchong
29
4.3k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
330
Transcript
Vue CLI 3͕ ͏·ͪΘΔ͍ ՌϦϯ @FruitRiin 2018/09/22 ʲୈ࢛ճʳJSϑϨʔϜϫʔΫ×ϏΞόογϡॳ৺ऀษڧձ
#sakenight4
ࣗݾհ - ՌϦϯ • Twitter@FruitRiin • גࣜձࣾORATTA←ιγϟήاը։ൃӡӦ αʔόʔΞϓϦέʔγϣϯΤϯδχΞ • ৬ۀPHPer
• JS͕͖ɻVue.js͍͍ͧʂ
લճϚαΧϦʹඋ͑ͨਓ
લճɿϚαΧϦʹඋ͑Δ৺ಘ
લճͷ͓͞Β͍
2018/09/21 Nuxt 2.0 Release!
Ͱࠓճ Vue CLI 3ͷ
Vue CLIͱʁ • Vue.jsͷڥߏஙΛͬͯ͘ΕΔπʔϧ • ࠇ͍ը໘͔Β `vue init webpack projname`
• ʮϘΠϥʔϓϨʔτʯͱ͍͏ܗͰ ࠷దͳϓϩδΣΫτͷܗΛ࡞Δ
͜͏͍͏ͭ
New: Vue CLI 3 • ܗϓϩδΣΫτʹ ʮϓϦηοτʯͰબΜͰ࡞Δ • Vue CLI͔ΒϓϥάΠϯΛՃ
• WebͰϓϩδΣΫτΛϚωʔδϝϯτ
͜Μͳͭ
ػೳΛબΜͰ
ઃఆΛมߋͯ͠
ىಈϏϧυ
CLIͱʁ
ͱ͍͑ɺ Vue CLI3͍͍Ͱ͢Ͷɻ ΊͰͨ͠ΊͰͨ͠ɻ
Ͱઙ͍ͷͰ ͏ͪΐͬͱ͍͖·͠ΐ͏ɻ
Vue CLI 3 ͕͏·ͪΘΔ͍
උߟɿʮ͏·ͪΘΔ͍ʯͱ • ʮ͏·͍ʯʴʮ͖ͪΘΔ͍ʯͷޠ • χίχίେඦՊ͋ͨΓΛಡΜͰͶʂ
ࠓ·ͰͷVueͱϥΠϒϥϦ
ྫɿVuexΛΠϯετʔϧ͢Δ 1.`npm install vuex` ͢Δ 2.vuexͷstoreΛ࡞Δ 3.vuexͷstoreΛimport, VueͷΠϯελϯεʹؚΊΔ 4.vuexΛར༻͢ΔίʔυΛॻ͘
npm install vuex
vuexͷstoreΛ࡞Δ
importͯ͠ΠϯελϯεʹؚΊΔ
Լ४උ͕৭ʑඞཁ
ྫɿϘΠϥʔϓϨʔτΛ͏ • `vue init webpack project` ͯ͠ ରࣜͷ࣭ͷͳ͔Ͱ VuexΛར༻͢Δʹ Yes
• VuexΛར༻͢ΔίʔυΛ࡞Δ
৽نͷϓϩδΣΫτͷΈ
͜Ε͔ΒͷVueͱϥΠϒϥϦ
VuexϓϥάΠϯΛΠϯετʔϧ • Vue CLI UI ্ͰʮVuexΛՃʯΛϙνΔ • ಋೖ͕ऴΘ͍ͬͯΔʂ • vuexΛར༻͢ΔίʔυΛॻ͘
None
ϓϥάΠϯ͕ϑΝΠϧΛ࡞ͬͯ͘ΕΔʂ
طଘͷϓϩδΣΫτʹՃ ઃఆ΄΅ෆཁ
ϓϥάΠϯԿΛ͢Δʁ • ϑΝΠϧ࡞ • ϑΝΠϧͷਖ਼نදݱஔ • ىಈ࣌ʹϑοΫͯ͠confΛॻ͖͑Δ
ϓϥάΠϯԿΛ͢Δʁ • ϑΝΠϧ࡞ • ϑΝΠϧͷਖ਼نදݱஔ • ىಈ࣌ʹϑοΫͯ͠confΛॻ͖͑Δ
ϓϩδΣΫτͷ ಋೖ·Ͱͬͯ͘ΕΔ ʢͷ͋Δʣ
ϓϩδΣΫτ͔ΒΈͨ conf͕͘͢͝খ͍͞
͍··Ͱ
ྫɿbuild.js
͜Ε͔Β
build ͱ conf σΟϨΫτϦ͕ͳ͍ webpack.config.js ͳ͍
ྫɿbabel.config.js
ࠩͳͷͰͱ͍ͯ
ϓϥάΠϯԿΛ͢Δʁ • ϑΝΠϧ࡞ • ϑΝΠϧͷਖ਼نදݱஔ • ىಈ࣌ʹϑοΫͯ͠configΛॻ͖͑Δ
webpackϥΠϒϥϦͷઃఆ ϓϥάΠϯ͕ࡁ·ͤͯΔ
Vue CLIϓϥάΠϯͷҙ • ՃͰ͖ͯআͰ͖ͳ͍ͷ͕ଟ͍ • Ճͷͨͼʹίϛοτͯ͠ ͤΔΑ͏ʹ͓ͯ͘͠ͱྑͦ͞͏
·ͱΊ • Vue CLI UIࠇ͍ը໘Λໟݏ͍͢Δਓʹ ࢝Ί͘͢ͳΔͷͰʁʢvue cli uiͷىಈʁ • Vue
CLI Pluginͷ͜͜·Ͱ͖͔ͨʂ ͱ͍͏͘Β͍ΏͱΓ༷ʢ࡞Δਓࠈ༷ • webpack.config.jsʹ͏·͞Εͳ͍
Vue.js͍͍ͧʂ Fin.