SlideShare a Scribd company logo
1 of 39
Download to read offline
comento-ui 자동훈!완성
JetBrains IDE에서 Vue UI Library 자동 완성 지원하기
코멘토 유성실
발표자 소개
유성실
유팀장 시루짱 짱시루?!? 임원 이모 비선실세
정신연령5살 성실바나스 인천성실 우사인성실
셀럽성실 아이유성실 아이쿠 에유 트레비콜렉터
코멘토 구혜선 팔씨름챔피언 컨퍼런스발표자
실시간노션업데이터 노션24시간상주
열정은 기술을 뛰어넘는다의 인간화
염소사운드장인
목차
배경
본격 삽질기
자동 완성 지원하기
남은 과제
느낀 점
배경
충격 공포 실화
아빠: 울딸 코멘트 유튜브 나온거 잘 봤어~😍
나: (코멘토인데…☹️
) 어… 고마워~~😀
자동 완성의 필요성
네이버에서 코멘트를 이긴 코멘토.jpg
comento-ui
1개월 동안 구축한 코멘토 디자인 시스템
Vue UI 라이브러리 (https://www.npmjs.com/package/comento-ui)
코멘토에서는 npm, yarn으로 다운받아서 사용중
comento-ui 실전 코딩
<c-button>
버튼
</c-button>
comento-ui 실전 코딩
<c-button type="..." color="...">
버튼
</c-button>
자동 완성이 필요한 프론트팀
그러나...
해당 분기 인프라 담당자였던
유성실 혼자 하게 되었다
본격 삽질기
의식의 흐름 시점 주의
End Image
tag
props
props value
참고: Vuetify
가설 세우기
파일 형식이 TS일 때만 자동 완성이 될 것이다🤔
comento-ui는 JS 형식이고 자동 완성이 되지 않음
Vuetify는 TS 형식이고 자동 완성이 됨
가설 검증하기
이름 파일 형식 component 자동 완성 props 자동 완성
Vuetify TS O O
BootstrapVue JS O O
Vuesax JS O X
가설 검증하기
이름 파일 형식 component 자동 완성 props 자동 완성
Vuetify TS O O
BootstrapVue JS O O
Vuesax JS O X
👉파일 형식이 JS여도 자동 완성이 된다
다시 가설 세우기
🤯
세울 가설이 없다…
도대체 JS에서의 자동 완성은 어떻게 가능한 걸까?
개발자의 친구 구글링 🔍✨
web-types.json
JetBrains에서 만든 다양한 웹 프레임워크를 문서화하기 위한 오픈 소스 표준
프레임워크에 구애받지 않고 JSON 문법 형식만 지키면 IDE에서 자동 완성 가능
참고: https://blog.jetbrains.com/webstorm/2021/01/web-types/
개발자의 친구 구글링 🔍✨
web-types.json
JetBrains에서 만든 다양한 웹 프레임워크를 문서화하기 위한 오픈 소스 표준
프레임워크에 구애받지 않고 JSON 문법 형식만 지키면 IDE에서 자동 완성 가능
👉web-types.json 파일이 있으면 JS여도 자동 완성이 된다!
참고: https://blog.jetbrains.com/webstorm/2021/01/web-types/
web-types.json 만드는 방법
1. 자체적으로 생성하기
2. 라이브러리 이용하기
참고: https://github.com/JetBrains/web-types#distribution
web-types.json 만드는 방법
1. 자체적으로 생성하기
Vue Library들이 대부분 사용 중인 방법
Vuetify
BootstrapVue
Nuxt.js
…
- JetBrains에서 직접 컨트리뷰트 진행함
참고: https://github.com/JetBrains/web-types#distribution
web-types.json 만드는 방법
2. 라이브러리 이용하기
vue-styleguidist: JSDoc 라이브러리
vue-docgen-web-types: vue-styleguidist의 내부 패키지인 vue-docgen-api를 이용하여
JSDoc 구문 분석을 해주는 라이브러리
참고: https://github.com/JetBrains/web-types#generating-web-types
web-types.json 만드는 방법
1. 자체적으로 생성하기
Vue UI Library들은 .js or .ts 형식이라 web-types.json을 쉽게 추출 가능
comento-ui는 .vue 형식이기 때문에 web-types.json으로 추출하기가 까다로움
2. 라이브러리 이용하기
comento-ui의 기존 구조를 유지하면서도 web-types.json을 추출 가능
web-types.json 만드는 방법
2. 라이브러리 이용하기 - 결정 ✅
comento-ui의 기존 구조를 유지하면서도 web-types.json을 추출 가능
1. 자체적으로 생성하기
Vue UI Library들은 .js or .ts 형식이라 web-types.json을 쉽게 추출 가능
comento-ui는 .vue 형식이기 때문에 web-types.json으로 추출하기가 까다로움
자동 완성 지원하기
자동 완성 지원하기
설정 파일 세팅
자동 완성 지원하기
컴포넌트에 주석 추가
자동 완성 지원하기
web-types.json 추출하기
yarn build
자동 완성 지원하기
web-types.json 추출하기
"attributes": [
"name": "size",
"description": "크기(small, medium, large, xlarge)",
"value": {
"type": "string"
},
"default": "'medium'"
"name": "color",
"description": "색상(primary, light-primary, success, error, secondary, info)",
{
"name": "comento-ui",
"contributions": {
"html": {
"tags": [
{
"name": "c-button",
"description": "",
{
"kind": "expression",
},
{
"value": {
"kind": "expression",
자동 완성 지원하기
컴포넌트 적용
tag
자동 완성 지원하기
컴포넌트 적용
props
자동 완성 지원하기
컴포넌트 적용
props value
남은 과제
남은 과제
1. 컴포넌트명 자동 등록
현재는 주석으로 @displayName을 입력해야만 자동 완성이 됨
해결 방법:
컴포넌트명에 C 추가하기
Vue 스타일 가이드에서 컴포넌트명은 단어 하나만 사용하지 말라고 권고하고 있음
우리가 참고하고있는 Vuetify에서도 v를 prefix로 사용중
- 진행중
남은 과제
1. 컴포넌트명 자동 등록
현재는 주석으로 @displayName을 입력해야만 자동 완성이 됨
해결 방법:
컴포넌트명에 C 추가하기
Vue 스타일 가이드에서 컴포넌트명은 단어 하나만 사용하지 말라고 권고하고 있음
우리가 참고하고있는 Vuetify에서도 v를 prefix로 사용중
2. VSCode 지원하기
팀원들이 모두 JetBrains IDE를 사용중이지만, 추후 VSCode를 사용하는 팀원들도 생길 수 있기 때문
해결 방법:
VSCode 자동 완성에 필요한 파일
VSCode에 플러그인 설치: Vetur
comento-ui에 자동 완성 지원 파일 추가: tags.json, attributes.json
- 진행중
(우선순위 낮음)
느낀 점
느낀 점
인프라 개선으로 팀원 생산성과 제품 개발 속도를 높일 수 있게 되어 뿌듯했음
느낀 점
인프라 개선으로 팀원 생산성과 제품 개발 속도를 높일 수 있게 되어 뿌듯했음
당연하게 사용했던 자동 완성이 어떻게 구현되는지 알 수 있어서 재밌었음
느낀 점
인프라 개선으로 팀원 생산성과 제품 개발 속도를 높일 수 있게 되어 뿌듯했음
당연하게 사용했던 자동 완성이 어떻게 구현되는지 알 수 있어서 재밌었음
shipjs 최고. 배포를 정말 쉽고 편하게 할 수 있음
참고 자료
Vuetify (https://github.com/vuetifyjs/vuetify)
Vuesax (https://github.com/lusaxweb/vuesax)
BootstrapVue (https://github.com/bootstrap-vue/bootstrap-vue)
https://blog.jetbrains.com/webstorm/2021/01/web-types/
https://github.com/JetBrains/web-types#distribution

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

comento-ui 자동완성 - JetBrains IDE에서 Vue UI Library 자동 완성 지원하기

  • 1. comento-ui 자동훈!완성 JetBrains IDE에서 Vue UI Library 자동 완성 지원하기 코멘토 유성실
  • 2. 발표자 소개 유성실 유팀장 시루짱 짱시루?!? 임원 이모 비선실세 정신연령5살 성실바나스 인천성실 우사인성실 셀럽성실 아이유성실 아이쿠 에유 트레비콜렉터 코멘토 구혜선 팔씨름챔피언 컨퍼런스발표자 실시간노션업데이터 노션24시간상주 열정은 기술을 뛰어넘는다의 인간화 염소사운드장인
  • 3. 목차 배경 본격 삽질기 자동 완성 지원하기 남은 과제 느낀 점
  • 5. 충격 공포 실화 아빠: 울딸 코멘트 유튜브 나온거 잘 봤어~😍 나: (코멘토인데…☹️ ) 어… 고마워~~😀
  • 6. 자동 완성의 필요성 네이버에서 코멘트를 이긴 코멘토.jpg
  • 7. comento-ui 1개월 동안 구축한 코멘토 디자인 시스템 Vue UI 라이브러리 (https://www.npmjs.com/package/comento-ui) 코멘토에서는 npm, yarn으로 다운받아서 사용중
  • 9. comento-ui 실전 코딩 <c-button type="..." color="..."> 버튼 </c-button>
  • 10. 자동 완성이 필요한 프론트팀 그러나... 해당 분기 인프라 담당자였던 유성실 혼자 하게 되었다
  • 13. 가설 세우기 파일 형식이 TS일 때만 자동 완성이 될 것이다🤔 comento-ui는 JS 형식이고 자동 완성이 되지 않음 Vuetify는 TS 형식이고 자동 완성이 됨
  • 14. 가설 검증하기 이름 파일 형식 component 자동 완성 props 자동 완성 Vuetify TS O O BootstrapVue JS O O Vuesax JS O X
  • 15. 가설 검증하기 이름 파일 형식 component 자동 완성 props 자동 완성 Vuetify TS O O BootstrapVue JS O O Vuesax JS O X 👉파일 형식이 JS여도 자동 완성이 된다
  • 16. 다시 가설 세우기 🤯 세울 가설이 없다… 도대체 JS에서의 자동 완성은 어떻게 가능한 걸까?
  • 17. 개발자의 친구 구글링 🔍✨ web-types.json JetBrains에서 만든 다양한 웹 프레임워크를 문서화하기 위한 오픈 소스 표준 프레임워크에 구애받지 않고 JSON 문법 형식만 지키면 IDE에서 자동 완성 가능 참고: https://blog.jetbrains.com/webstorm/2021/01/web-types/
  • 18. 개발자의 친구 구글링 🔍✨ web-types.json JetBrains에서 만든 다양한 웹 프레임워크를 문서화하기 위한 오픈 소스 표준 프레임워크에 구애받지 않고 JSON 문법 형식만 지키면 IDE에서 자동 완성 가능 👉web-types.json 파일이 있으면 JS여도 자동 완성이 된다! 참고: https://blog.jetbrains.com/webstorm/2021/01/web-types/
  • 19. web-types.json 만드는 방법 1. 자체적으로 생성하기 2. 라이브러리 이용하기 참고: https://github.com/JetBrains/web-types#distribution
  • 20. web-types.json 만드는 방법 1. 자체적으로 생성하기 Vue Library들이 대부분 사용 중인 방법 Vuetify BootstrapVue Nuxt.js … - JetBrains에서 직접 컨트리뷰트 진행함 참고: https://github.com/JetBrains/web-types#distribution
  • 21. web-types.json 만드는 방법 2. 라이브러리 이용하기 vue-styleguidist: JSDoc 라이브러리 vue-docgen-web-types: vue-styleguidist의 내부 패키지인 vue-docgen-api를 이용하여 JSDoc 구문 분석을 해주는 라이브러리 참고: https://github.com/JetBrains/web-types#generating-web-types
  • 22. web-types.json 만드는 방법 1. 자체적으로 생성하기 Vue UI Library들은 .js or .ts 형식이라 web-types.json을 쉽게 추출 가능 comento-ui는 .vue 형식이기 때문에 web-types.json으로 추출하기가 까다로움 2. 라이브러리 이용하기 comento-ui의 기존 구조를 유지하면서도 web-types.json을 추출 가능
  • 23. web-types.json 만드는 방법 2. 라이브러리 이용하기 - 결정 ✅ comento-ui의 기존 구조를 유지하면서도 web-types.json을 추출 가능 1. 자체적으로 생성하기 Vue UI Library들은 .js or .ts 형식이라 web-types.json을 쉽게 추출 가능 comento-ui는 .vue 형식이기 때문에 web-types.json으로 추출하기가 까다로움
  • 27. 자동 완성 지원하기 web-types.json 추출하기 yarn build
  • 28. 자동 완성 지원하기 web-types.json 추출하기 "attributes": [ "name": "size", "description": "크기(small, medium, large, xlarge)", "value": { "type": "string" }, "default": "'medium'" "name": "color", "description": "색상(primary, light-primary, success, error, secondary, info)", { "name": "comento-ui", "contributions": { "html": { "tags": [ { "name": "c-button", "description": "", { "kind": "expression", }, { "value": { "kind": "expression",
  • 33. 남은 과제 1. 컴포넌트명 자동 등록 현재는 주석으로 @displayName을 입력해야만 자동 완성이 됨 해결 방법: 컴포넌트명에 C 추가하기 Vue 스타일 가이드에서 컴포넌트명은 단어 하나만 사용하지 말라고 권고하고 있음 우리가 참고하고있는 Vuetify에서도 v를 prefix로 사용중 - 진행중
  • 34. 남은 과제 1. 컴포넌트명 자동 등록 현재는 주석으로 @displayName을 입력해야만 자동 완성이 됨 해결 방법: 컴포넌트명에 C 추가하기 Vue 스타일 가이드에서 컴포넌트명은 단어 하나만 사용하지 말라고 권고하고 있음 우리가 참고하고있는 Vuetify에서도 v를 prefix로 사용중 2. VSCode 지원하기 팀원들이 모두 JetBrains IDE를 사용중이지만, 추후 VSCode를 사용하는 팀원들도 생길 수 있기 때문 해결 방법: VSCode 자동 완성에 필요한 파일 VSCode에 플러그인 설치: Vetur comento-ui에 자동 완성 지원 파일 추가: tags.json, attributes.json - 진행중 (우선순위 낮음)
  • 36. 느낀 점 인프라 개선으로 팀원 생산성과 제품 개발 속도를 높일 수 있게 되어 뿌듯했음
  • 37. 느낀 점 인프라 개선으로 팀원 생산성과 제품 개발 속도를 높일 수 있게 되어 뿌듯했음 당연하게 사용했던 자동 완성이 어떻게 구현되는지 알 수 있어서 재밌었음
  • 38. 느낀 점 인프라 개선으로 팀원 생산성과 제품 개발 속도를 높일 수 있게 되어 뿌듯했음 당연하게 사용했던 자동 완성이 어떻게 구현되는지 알 수 있어서 재밌었음 shipjs 최고. 배포를 정말 쉽고 편하게 할 수 있음
  • 39. 참고 자료 Vuetify (https://github.com/vuetifyjs/vuetify) Vuesax (https://github.com/lusaxweb/vuesax) BootstrapVue (https://github.com/bootstrap-vue/bootstrap-vue) https://blog.jetbrains.com/webstorm/2021/01/web-types/ https://github.com/JetBrains/web-types#distribution