BXUI Code Snippets with snippets.json Configuration
BX-UI 프레임워크를 위한 VS Code 코드 스니펫 확장입니다. .bxui/snippets.json
설정 파일을 통해 개인화된 스니펫 값을 제공합니다.
기능
- BX-UI 프레임워크용 다양한 코드 스니펫 제공
.bxui/snippets.json
설정 파일을 통한 개인화된 스니펫 설정
- 동적 스니펫 생성 및 자동완성
- 실시간 설정 파일 감지 및 리로드
설치 및 설정
1. 확장 설치
VS Code 확장 마켓플레이스에서 "BXUI Code Snippets"를 검색하여 설치하세요.
2. snippets.json 설정 파일 생성
프로젝트 루트 디렉토리에 .bxui/snippets.json
파일을 생성하세요:
{
"defaultProxyParam": "apiUrl: \"/api/sample\",\n method: \"POST\"",
"customSnippets": {
"custom-api": "const api = {\n url: \"${1:apiUrl}\",\n method: \"${2:GET}\",\n data: {\n ${0}\n }\n}"
},
"author": "홍길동 (gildong@bankwareglobal.com)",
"projectName": "BXUI Project"
}
snippets.json 설정을 통한 스니펫 개선
BXUI Create proxy call 스니펫 개선
기존 스니펫에서 ${1}
로 입력받던 부분을 .bxui/snippets.json
파일의 defaultProxyParam
설정으로 대체됩니다:
기존 스니펫:
const param = {
${1} // 사용자가 직접 입력
}
개선된 스니펫 (bxui-proxy-enhanced):
const param = {
apiUrl: "/api/sample",
method: "POST" // snippets.json 에서 자동으로 설정
}
개발자용 빌드 설정
VSIX 파일 생성
# vsce 설치 (한 번만)
npm install -g vsce
# 확장 패키징
vsce package
TypeScript 컴파일
# 의존성 설치
npm install
# 컴파일
npm run compile
# 개발 모드
npm run watch
사용 방법
기본 스니펫
Prefix |
Description |
form |
BXUI Declare useForm hook |
proxy |
BXUI Create proxy async call |
use-proxy |
BXUI Declare useProxy |
use-modal |
BXUI Declare useModal |
use-menu |
BXUI Declare useMenu |
msg-alert |
BXUI Create alert message |
msg-confirm |
BXUI Create confirm message |
msg-error |
BXUI Create error message |
msg-valid |
BXUI Create valid message |
msg-popup |
BXUI Create popup |
gridconfig |
BXUI Create grid config with single rowSelection |
gridconfig-multi |
BXUI Create grid config with multi rowSelection |
gridevent-cell-click |
BXUI Grid cell click event |
gridevent-cell-dbclick |
BXUI Grid cell double click event |
gridevent-row-click |
BXUI Grid row click event |
gridevent-row-dbclick |
BXUI Grid row double click event |
gridevent-ready |
BXUI Grid ready event |
gridevent-data-update |
BXUI Grid row data updated event |
gridevent-body-scroll |
BXUI Grid body scroll event |
gridevent-row-select |
BXUI Grid row selected event |
gridevent-cell-change |
BXUI Grid cell value change event |
gridevent-row-drag-end |
BXUI Grid row drag end event |
i18n |
BXUI Create i18n translate function |
code-list |
BXUI Get code list function |
code-value |
BXUI Get code value function |
valid |
BXUI Call validate function |
comment |
BXUI Make comment |
layout-page |
BXUI Make page layout |
layout-modal |
BXUI Make modal layout |
template-search-grid |
BXUI Search and Grid template |
template-search-grid-detail |
BXUI Search and Grid and Detail template |
template-search-tab |
BXUI Search and Tab template |
template-tree-detail-grid |
BXUI Tree and Detail and Grid template |
log |
BXUI console log |
dir |
BXUI console dir |
<BwgProvider |
BXUI BwgProvider component |
<CardRow |
BXUI CardRow component |
<CardCol |
BXUI CardCol component |
<Description |
BXUI Description component |
<LabelBox |
BXUI LabelBox component |
<Section |
BXUI Section component |
<Title |
BXUI Title component |
<ViewBox |
BXUI ViewBox component |
<DatePicker |
BXUI DatePicker component |
<MonthPicker |
BXUI MonthPicker component |
<YearPicker |
BXUI YearPicker component |
<Cascader |
BXUI Cascader component |
<CheckBox |
BXUI CheckBox component |
<InputBox |
BXUI InputBox component |
<InputIconBox |
BXUI InputIconBox component |
<RadioBox |
BXUI RadioBox component |
<SelectBox |
BXUI SelectBox component |
<Switch |
BXUI Switch component |
<TextArea |
BXUI TextArea component |
<Grid |
BXUI Grid component |
<GridCount |
BXUI GridCount component |
<PagingBox |
BXUI PagingBox component |
<Transfer |
BXUI Transfer component |
<Breadcrumb |
BXUI Breadcrumb component |
<Button |
BXUI Button component |
<Float |
BXUI Float component |
<Collapse |
BXUI Collapse component |
<Tabs |
BXUI Tabs component |