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 果物リン
embodied記憶の依代 聖杯問答/ Vessel of Memory: The Grail Dialogue #embodied_llm
fruitriin
2
140
ClaudeCodeと遠くへいくためのパーミッションルール/Stop Checking, Start Trusting: Claude Code Permission Rules
fruitriin
0
48
Claude Codeと物忘れ / Invitation talk about context - Why Claude Code forget?
fruitriin
0
78
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
220
Electron+Vue+Swift=真のデスクトップアプリ / How to create "Really" desktop app using Electron
fruitriin
0
120
ある日オレオレフレームワークを作りたくなったぞ/Want to Create Oreore Framework
fruitriin
1
170
fishとfzfはじめて 豊かになりました / fish and fzf is good
fruitriin
1
960
Chrome Devtools使いこなしたい/I want to master devtool
fruitriin
3
1.5k
Event Stage - 真面目に作ったけど 全くウケなくてクソだったアプリ/I made new service but they say shit
fruitriin
0
200
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Done Done
chrislema
186
16k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
180
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
120
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
320
Building Applications with DynamoDB
mza
96
7k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
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.