Generated Computers
Locals는 Apple Silicon 엔진으로 로컬 LLM을 최대 3배 빠르게 실행하는 Generated Computers 제품
Vue 3으로 Shopify 앱을 만든다
Build Shopify apps with Vue 3. polaris-vue-elements gives you typed Vue components (props, events, v-model) around Shopify Polaris web components like s-button, s-text-field and s-modal, generated fro
개발 도구TypeScript · JavaScriptGitHub @HQCuong온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Typed Vue 3 wrappers for Shopify Polaris web components (s-button, s-text-field, s-modal…) — props, events and v-model generated from the official Custom Elements Manifest.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗English | Tiếng Việt | 한국어 | 简体中文 | 日本語 | Deutsch | Français | Español
Documentation · Getting started · Components · Embedded app guide · Changelog
Typed Vue 3 wrapper components for Shopify Polaris web components: the s-* custom elements used to build Shopify App Home (embedded admin) apps.
The Polaris runtime itself loads from Shopify's CDN (the polaris-2.js stable channel receives compatible updates automatically). This library gives you an idiomatic, fully typed Vue surface on top of it.
@shopify/polaris-types): union-typed props like variant, autocomplete in templates, typed @click / @aftershow listeners.v-model on 17 form components (STextField, SCheckbox, SSelect, SChoiceList, …), each mapped to its correct property/event pair.SModal exposes a typed $el (ModalElement), so modal.value?.$el.showOverlay() type-checks, alongside Polaris's declarative commandFor / command pattern.$attrs, slots are forwarded verbatim, and brand-new Polaris components can always be used as raw s-* tags. A stale wrapper means missing types for new features, never broken existing ones.npm install polaris-vue-elements
Vue ^3.5 is a peer dependency.
The wrappers are presentational only. Your host app loads the Polaris runtime from Shopify's CDN and tells Vue that s-* tags are custom elements:
<!-- index.html -->
<script src="https://cdn.shopify.com/shopifycloud/polaris-2.js"></script>
// vite.config.ts
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith('s-'),
},
},
})
Note:
polaris-2.jsis Shopify's stable channel and brings the admin's new visual design. Apps still onpolaris-1.jskeep working: 2.0's component API is the same as 1.1 apart from a few additions. See Polaris 2.0 and the new admin design.
<script setup lang="ts">
import { ref } from 'vue'
import { SButton, STextField } from 'polaris-vue-elements'
const name = ref('')
</script>
<template>
<STextField v-model="name" label="Name" />
<SButton variant="primary" @click="console.log(name)">Save</SButton>
</template>
Tip: prefer writing Polaris's own
<s-button>tags? Add"types": ["polaris-vue-elements/elements"]to yourtsconfig.json, and Volar /vue-tsctype-check raw<s-*>tags too (types only;v-modelstays wrapper-only). See Typing raw<s-*>tags.
Everything lives at polaris-vue-elements.dev:
v-model, overlays and typed raw tags.fetch, navigation and the save bar.The site's source is in docs/; run it locally with npm run docs:dev.
Everything derivable from Shopify's manifest is machine-generated; human judgment lives in one small file.
@shopify/polaris-types (custom-elements.json) ← source of truth
│ npm run generate
▼
src/lib/generated/ ← metadata, Props/Events/Element types, components (DO NOT EDIT)
src/lib/runtime/ ← createWrapper: one generic factory for all 62 components
src/lib/overrides.ts ← hand-written: v-model mappings only
Drift-guard tests make forgetting impossible: CI fails if generated code is stale, if a manifest component lacks a wrapper, or if a new form-like component is missing a v-model override. A scheduled workflow (sync-polaris.yml) opens a sync PR automatically when a new @shopify/polaris-types is published.
npm update @shopify/polaris-types
npm run generate # regenerate wrappers + types
npm run docs:generate # regenerate component reference docs
git diff # review, then note API changes in CHANGELOG.md
npm install
npm run dev # playground (src/App.vue) with live Polaris components
npm run docs:dev # documentation site
npm run test:unit # vitest (drift guards + wrapper behavior)
npm run type-check # vue-tsc
npm run lint # oxlint + eslint
npm run generate # regenerate src/lib/generated/ from the manifest
npm run docs:generate # regenerate docs/components/ from the manifest
npm run build:lib # build the publishable package into dist/
Bug reports, docs fixes and pull requests are welcome. See CONTRIBUTING.md for setup, ground rules and the pre-PR checklist, and the Code of Conduct. To report a vulnerability, see SECURITY.md.
Releases are cut from main by pushing a version tag. release.yml does the rest: checks, npm publish with provenance via npm Trusted Publishing, and a GitHub Release whose notes come from CHANGELOG.md.
CHANGELOG.md, move the ## [Unreleased] entries under a new ## [x.y.z] - YYYY-MM-DD heading and update the compare links at the bottom. The polaris-types sync PRs record new/removed components there automatically; add prop, slot and icon changes by hand (removals are breaking).npm version x.y.z --no-git-tag-version, commit both files, and push to main.git tag vx.y.z && git push origin vx.y.z. Tags with a pre-release suffix (e.g. v0.3.0-rc.0) publish under the next dist-tag.MIT. Not affiliated with or endorsed by Shopify.