Vue Fes Japan 2019 ãµã¤ãã®ã½ã¼ã¹ã³ã¼ããå ¬éãã
ãã®è¨äºã¯ Nuxt.js Advent Calendar 2019 - Qiita ã®æçµæ¥ï¼25æ¥ï¼ã®è¨äºã§ãã
Vue Fes Japan 2019 ã® Web ãµã¤ãã®ã½ã¼ã¹ã³ã¼ããå ¬éããã®ã§ããç¥ãããã¾ãã
æ¦è¦
Vue Fes Japan 2019 㯠Nuxt.js ã®éçãµã¤ãã¸ã§ãã¬ã¼ãæ©è½ï¼nuxt generateï¼ã«ãã£ã¦ä½æãã¦ããã
çæããéçãã¡ã¤ã«ã Netlify ã§ãã¹ãã£ã³ã°ãã¦ããã
ã¹ãã³ãµã¼æ å ±ãªã©ã®ã³ã³ãã³ãããããã¬ã¹ CMS ã§ãã Contentful ã§ç®¡çãã¦ããããããã JAMstack æ§æã
ãã¤ã³ããããã¯ã¢ãã
Vue Fes Japan 2018 ãµã¤ãã®ã½ã¼ã¹ã³ã¼ãã«ã¤ãã¦ã¯ä¸è¨ã§è§£èª¬ãã¦ããã2019 ã®ãã®ã¨å ±éãã¦ããç¹ãå¤ãã®ã§ããããã¦åèã«ãã¦ããã ãããã
以ä¸ã¯ 2019 ã«ãªã£ã¦å¤æ´ããç¹ã«çµã£ã¦ãããã¤ããã¤ã³ããããã¯ã¢ãããã¦ããã
SVG ã¢ãã¡ã¼ã·ã§ã³
ã¾ããä½ã¨è¨ã£ã¦ãç®ãå¼ãããããã®ã¡ã¤ã³ãã¸ã¥ã¢ã«ã® SVG ã¢ãã¡ã¼ã·ã§ã³ã
ãã㯠Vue.js æ¥æ¬ã¦ã¼ã¶ã¼ã°ã«ã¼ããèªã SVG è¸äººã® @hashedrock ãããæ å½ãããå®è£ ã«ã¤ãã¦ã¯ã½ã¼ã¹ã³ã¼ããè¦ã¦ããã ããã»ããè¯ãã¨æãã
ãããã¬ã¹ CMS ã®å°å ¥
ã¢ã¼ããã¯ãã£ã®å¤§ããå¤æ´ç¹ã¯ããããããã¬ã¹ CMS ã§ãã Contentful ãå°å ¥ããã¹ãã³ãµã¼æ å ±ãã¿ã¤ã ãã¼ãã«æ å ±ãªã©ã®ã³ã³ãã³ããããã§ç®¡çããããã«ããã
ãã㯠Vue Fes Japan 2018 ã®ã¨ãã®åçã«ãã¨ã¥ãã
ã¹ãã³ãµã¼æ å½çãããã¹ãã³ãµã¼ã®ãã´ã PR æç« ãªã©ã渡ããããã³ã«ããããåæ ããããã«ãªã¯ã¨ã¹ããä½æããã®ãé¢åã ã£ãã¨ãã課é¡ã解決ããããã«ãããã¬ã¹ CMS ãå°å ¥ããã
ã¾ããå ¬å¼ã¢ãã¤ã«ã¢ããªãç¨æããã®ã§ãã¢ãã¤ã«ã¢ããªã¨ Web ãµã¤ãã§é ä¿¡ããã³ã³ãã³ããä¸å 管çããããã§ãå½¹ã«ç«ã£ã¦ãããã
é¢é£ãªã³ã¯
Issue ãå ¬éããã®ã§è©³ç´°ã¯ãã¡ãã§ã
ãããã¬ã¹ CMS ãææ¡ãã¦ãã ãã£ã @ryamakuchi ããã«ãããå種ãããã¬ã¹ CMS ã®èª¿æ»åã³æ¯è¼ãè¦ããã¨ãã§ããã
éç¨ããã¼
ã¹ãã³ãµã¼æ å ±ãä¾ã«ã¨ãã¨ãã¹ãã³ãµã¼æ å½çã Contentful ã§ã¹ãã³ãµã¼æ å ±ãæ´æ°ã Build ãã¿ã³ããããã¨æ¼ãã¨ãNetlify ã®ãã«ããå®è¡ããã¦ãã³ã³ãã³ãã®æ´æ°ãåæ ãããã¨ããéç¨ããã¼ã
Web ãµã¤ããéç¨ãã人ã¨ãWeb ãµã¤ãã®ã³ã³ãã³ãã管çãã人ã¨ãç°ãªãã±ã¼ã¹ã§ãç¹ã«ç¸æ§ãè¯ãã¨æãã
ã¾ããç¹°ãè¿ãã«ãªãããã¢ãã¤ã«ã¢ããªã¨ Web ãµã¤ãã¸é ä¿¡ããã³ã³ãã³ããä¸å 管çã§ããç¹ãããã£ãï¼ãã ãããããã¬ã¹ CMS å°å ¥ã決ããæç¹ã§ã¯ãã¢ãã¤ã«ã¢ããªã®æä¾ã¯äºå®ããã¦ããªãã£ãï¼
TypeScript ã®å°å ¥
ããã«ã²ã¨ã¤å¤§ããªå¤æ´ã¨ã㦠TypeScript ã®å°å ¥ãããã
ã¯ã©ã¹ã¹ã¿ã¤ã«ã®è¨è¿°
Vue ã³ã³ãã¼ãã³ã㯠ã¯ã©ã¹ã¹ã¿ã¤ã« ã§è¨è¿°ããã
nuxt-property-decorator ãå ¥ãã¦ãããããã¯å é¨ã§
ã使ã£ã¦ããã
Class API 㨠Composition API
vuefes-2019 ãªãã¸ããªã¯ Vue ã³ã³ãã¼ãã³ããã¯ã©ã¹ã¹ã¿ã¤ã«ã§è¨è¿°ããä¾ã¨ãã¦åèã«ããæ義ã¯ãããããããªãããClass API 㯠RFC ããå¤ããã¦ãã¾ããComposition API ãã¢ã¯ãã£ã㪠RFC ã¨ããç¶æ³ãªã®ã§æ³¨æãå¿ è¦ã
Nuxt TypeScript
ã¾ããNuxt.js åãã® TypeScript ãµãã¼ãã Nuxt.js v2.9 以éãã大ããå¤ãã£ãããvuefes-2019 ã§ã¯ããã«è¿½å¾ã§ãã¦ããªãããã®ç¹ã注æãå¿ è¦ã
Vuex ã¹ãã¢ã®åå®ç¾©
Vuex ã¹ãã¢ã§ã¯
- ã²ãã¿ã¼ã®åå®ç¾©ã any å
- ãã¥ã¼ãã¼ã·ã§ã³ãã¢ã¯ã·ã§ã³ ã® payload ã any å
ãªã©ãåå®ç¾©ã«é¢ãã課é¡ããããããããã«ã¤ãã¦ãåæ¨è«ãã¯ããããããªæ¸ãæ¹ãããã
å®è·µ TypeScript ã大ãã«åèã«ããã¦ããã ããã
å®è·µTypeScript ~ BFFã¨Next.js&Nuxt.jsã®åå®ç¾©~
- ä½è :åäº å¥æ
- åºç社/ã¡ã¼ã«ã¼: ãã¤ããåºç
- çºå£²æ¥: 2019/06/26
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
å®è£ ããªããè©°ã¾ã£ãç¹ãèè ã® @takepepe ããã«å©ãã¦ããã ããã
ã»ãã¨ãã«ã¤ãã人ã¯ãããã
話ãé¸ãããã©ã@takepepe ããã«ã¯ãªã¢ã«ã§ãããåãããã¦ãããæ©ä¼ããã£ã¦ãã¾ã¨ã£ã¦ããç©ãããªç©ºæ°ã«ã»ãã¨æå¿ããã
åã©ãã®é ãæ¯è¦ªã«ãã»ãã¨ãã«ã¤ãã人ã¯ãããããã®ããã¨è¨ããã¦ãããã©ããããã人ã®ãã¨ãè¨ããã ãªãã¨æãã
TypeScript ãå°å ¥ãã¦ã©ãã ã£ãã
é話ä¼é¡ãåè¿°ã®ããã« Vue Fes Japan 2019 ãµã¤ãã§ã¯ã³ã³ãã³ãã Contentful ã§ç®¡çãã¦ã㦠API çµç±ã§ãªã½ã¼ã¹ãåå¾ãã¦ããã
ãã®ã¨ãã«åå¾ã§ãããªã½ã¼ã¹ã®ã¹ãã¼ãã TypeScript ã®åã¨ãã¦æ¸ããã¨ã§ãçããããã¥ã¡ã³ããï¼= Living documentation. å®è£ ã¨ä¹é¢ããã«ã¡ã³ããã³ã¹ããç¶ããããã¥ã¡ã³ãã®ãã¨ï¼ã¨ãã¦æ©è½ãããã¨ããã®ãä¸çªããã£ãç¹ã ã¨æãã
ã³ã¼ãã¬ãã¥ã¼ãããããã£ãããä¸è¨ã®ä¾ã®ããã«ãã¢ããªã³ã°ãããã¨ãã®ã³ãã¥ãã±ã¼ã·ã§ã³ãæã£ãã
éå¬å¹´ãã¨ã«ãã£ã¬ã¯ããªãåãã
vuefes-2018 ã¯æåã® Vue Fes Japan ã ã£ããã https://vuefes.jp/ ã¨ãã¦å ¬éããããéå¬å¹´ãå¢ããããã
ã¨ããå ·åã«ãã£ã¬ã¯ããªãåãã¦å ¬éããããã«ããã
ã¾ããéå¬å¹´ãã¨ã«æ°ããæè¡ãªã©ãæ¡ãå ¥ãã¦ã¿ããããã®ã¨ãã«éå»ã®ã³ã¼ãã足ããã«ãªã£ã¦ã»ãããªããã¨ããã¢ããã¼ã·ã§ã³ãããããªãã¸ããªãåããããã«ããã
ç°ãªããªãã¸ããªã®éçãµã¤ããåä¸ãã¡ã¤ã³ã§é ä¿¡ããæ¹æ³ã¨ãã¦ãNetlify ã® Proxy æ©è½ã使ãããã«ããã
Netlify ã® Proxy æ©è½
Netlify ã® Proxy æ©è½ã®ããã¥ã¡ã³ãã¯ä¸è¨ã
vuefes-2018 㨠vuefes-2019 ãªãã¸ããªããããã« netlify.toml
ãã¡ã¤ã«ãç½®ãã
ãã®ä»
ä»ã«ã
- ãã¹ããã¬ã¼ã ã¯ã¼ã¯ã Mocha ãã Jest ã«ä¹ãæã
- Prettier ãå°å ¥
- Stylelint ãå°å ¥
ãªã©ãè¡ã£ããPrettier ã Stylelint ã«ã¤ãã¦ã¯ @yinmï¼ã¬ã¾ã£ã¡) ãããã¬ã³ã¬ã³é²ãã¦ãããã
ä»å¾ã® TODO
Vue Fes Japan 2019 ã¯çµäºããããå®ã¯ä¸é¨ Contentful ãããã¼ã¿ãåå¾ããããã«ãªã£ã¦ããªãã£ããçã®æ®ã¿ã¹ã¯ããããæ°æã¡çã«ã¢ã¤ã¢ã¤ããã®ã§ãæéãè¦ã¤ãã¦çä»ãã¦ããããã
以ä¸ã§ããåèã«ãªãã°å¹¸ãã§ããã¡ãªã¼ã¯ãªã¹ãã¹ï¼