Awesome
SFC Playground with Vant
This is an Vant SFC Playground. Click the vercel.app Or zhixiaoqiang.github.io link to view.
NOTE! The reason why this is designed to manually
import { injectVant }
is to be more universally compatible with any component library, Not only Vant.
What's inside?
Try Vant in the Playground. Currently only Vant 3+ is supported
Features
- β‘οΈ Vant 3+
- β‘οΈ PreLoad ImportsFile,Instantly display content(e0d5c6)
- π€π» Free switch Vant/Vue version, and more
- π οΈ Rich Features
- βοΈ Deploy on Netlify/vercel/GitHub Pages, zero-config
- π‘ Support the Typescript
- π Easy to create your own
- π€© Download project support generated package.json by user input (13ee3f)
- π οΈ Smarter and more efficient npm scripts
Future Features
coming soon
- π οΈ Support Vant dark mode
- π οΈ Support on-demand introduction
- π οΈ CLI
- π Fully Typed API
- π Switch CDN
Utilities
This SFC Playground has some additional tools already setup for you:
- pnpm as a packages manager
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
- Vant a Lightweight Mobile UI Components built on Vue
- @vue/repl for Vue SFC REPL as a Vue 3 component
Get Started
- Click
Use this template
, and clone your repodegit https://github.com/zhixiaoqiang/sfc-playground-vant#main
orgit clone https://github.com/zhixiaoqiang/sfc-playground-vant --depth 1
. degit - Adjust the following files.
src
βββ components
β βββ npm-version-switch
β βββ helps.ts # add version switch feature
βββ config.ts # config welcome codeγCDNγadditionalFiles...
βββ store.ts # includes base functions...
then it'll be your repository totally.
Build
To build the playground, run the following command:
pnpm build
Develop
To develop the playground, run the following command:
pnpm dev
Create Changelog
- Execute
pnpm changeset
to add a changeset. - Execute
pnpm changeset version
to changeCHANGELOG.md
. - Execute
pnpm changeset publish
to publishnpm library
. [can skip] - Execute
git commit
, this command will triggerlint-staged
andcommitzen
. - Execute
git push
to triggerGithub Actions
orvercel Deploy
CHANGELOG
Please refer to CHANGELOG for details.
Inspired by Evan You's Vue SFC Playground
License
MIT