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
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
110
記憶を高速で思い出す全文検索パフォーマンス・チューニング テクニック/How to make your AI recall, quickly
fruitriin
0
65
入社半年で作った"社内でも使える"ツール集/Everything I Built on the Side in Half a Year
fruitriin
0
86
embodied記憶の依代 聖杯問答/ Vessel of Memory: The Grail Dialogue #embodied_llm
fruitriin
2
170
ClaudeCodeと遠くへいくためのパーミッションルール/Stop Checking, Start Trusting: Claude Code Permission Rules
fruitriin
0
63
Claude Codeと物忘れ / Invitation talk about context - Why Claude Code forget?
fruitriin
0
86
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
240
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
Balancing Empowerment & Direction
lara
6
1.1k
Faster Mobile Websites
deanohume
310
31k
It's Worth the Effort
3n
188
29k
Ethics towards AI in product and experience design
skipperchong
2
300
Claude Code のすすめ
schroneko
67
220k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
Statistics for Hackers
jakevdp
799
230k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
180
The agentic SEO stack - context over prompts
schlessera
0
790
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
770
4 Signs Your Business is Dying
shpigford
187
22k
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.