vfunc.js

예제

엔진 예제 21종(layer1)과 컴포넌트 예제 7종(layer2)은 모두 빌드 없이 동작하고, 각 폴더의 README에 설명이 있습니다. 모든 예제가 CSP 메타 태그, 외부 스크립트, data-action/data-ref, vf.html, 토큰만 쓰는 CSS 규칙을 지키며, 저장소의 브라우저 테스트가 콘솔 에러·경고 0개와 핵심 동작을 확인합니다.

layer1/examples보여 주는 것
01-helloThe smallest vfunc.js page: one <script> tag and one component. esm.html shows the same component as an ES module.source
02-counterProduction: <script src="https://cdn.jsdelivr.net/npm/vfunc@1.2.0/dist/vfunc.min.js" integrity="sha384-yTR0o8US3nk+D1XIBAsv1O/lMFA5tV3V021xPo8yxyqnBNSxi1rqINVvBOykAEkK" crossorigin="anonymous"></script> · ESM: import vf from 'vfunc'source
03-todo모든 행을 이벤트 종류마다 위임 하나로 처리하고, 사용자 입력을 이스케이프합니다.source
04-methods-refsProduction CDN and ESM lines: see [01 hello](../01-hello/README.md).source
05-compositionProduction CDN and ESM lines: see [01 hello](../01-hello/README.md).source
06-attach-published-html"Keep your HTML, control only what you need." The page is a publisher's static HTML. vfunc controls two areas and leaves everything else alone.source
07-formProduction CDN and ESM lines: see [01 hello](../01-hello/README.md).source
08-fetch-listProduction CDN and ESM lines: see [01 hello](../01-hello/README.md).source
09-spa-hash-routerWith npm: import vf from 'vfunc'. Script tag: see [01 hello](../01-hello/README.md).source
10-spa-appindex.html <div id="app"> + <script type="module" src="app.js">source
11-css-tokens-themesource
12-with-bootstrap기존 Bootstrap 마크업의 클래스는 그대로 두고 동작만 더합니다.source
13-with-tailwindsource
14-before-after-conversionAI 프롬프트 킷의 실제 적용 예입니다.source
15-with-chartjs네 가지로 어떤 라이브러리든 붙입니다.source
16-legacy-ie같은 엔진의 ES5 배포 파일입니다.source
17-i18nsource
18-extend-pluginvfunc를 고치지 않고 확장합니다.source
19-design-apply같은 앱, 스킨 세 개, JS 변경 0.source
20-merge-published로직은 그대로 두고 render 마크업만 퍼블리싱 마크업으로 바꾸며 기존 훅을 다시 답니다.source
21-cache-update앱 웹뷰, 키오스크, PWA, 인앱 브라우저는 스스로 새로고침하지 않습니다.source
layer2/examples보여 주는 것
custom-component앱의 vsPriceTag(vsBadge + vf.fmt)와 vfCartLine(vfNumberInput + vsPriceTag)으로 만든 장바구니. 브랜드 색과 버튼 모양은 CSS에서만 바꿉니다.source
dashboard핵심 수치, 주문 그리드, 매출 차트. 스위치 하나로 기본 그리드·차트와 Tabulator·Chart.js 어댑터를 바꿉니다.source
gallerylayer2의 모든 컴포넌트를 한 페이지에서 한국어·영어로 봅니다. 정적 vs 마크업, vf 인스턴스와 키보드 동작.source
landingHTML·CSS로 만든 소개 페이지에 카드, 수치, 캐러셀, FAQ 아코디언, 구독 폼만 컴포넌트로 넣습니다.source
legacy-ievfunc-all.legacy.min.js 위의 ES5 지점 보고서: 수치 카드, 행을 누르면 vfModal이 뜨는 vfGrid, vfChart, 한국어·영어.source
settings-form폼 하나에 vs 필드, error prop으로 검증, 초기화 전 vfConfirm, 저장 뒤 vfToast, 한국어·영어.source
third-party-custom같은 Leaflet 지도를 L0(컴포넌트에서 직접), L1(앱 래퍼), L2(템플릿에서 만든 계약 어댑터)로 보입니다.source

저장소를 받아 직접 실행하려면 저장소 루트에서 python -m http.server 8080을 실행하고 http://localhost:8080/layer1/examples/와 http://localhost:8080/layer2/examples/를 여세요.