Skip to content

Commit 3afe304

Browse files
committed
feat(demo): build live demo
1 parent bb59f50 commit 3afe304

File tree

6 files changed

+24
-2
lines changed

6 files changed

+24
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ lerna-debug.log*
99

1010
node_modules
1111
dist
12+
dist-demo
1213
dist-ssr
1314
*.local
1415

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"files": {
99
"ignoreUnknown": false,
10-
"ignore": ["dist"]
10+
"ignore": ["dist", "dist-demo"]
1111
},
1212
"formatter": {
1313
"enabled": true,

examples/DemoApp.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="flex flex-col gap-y-12 container px-6 py-10 max-w-xl">
2+
<div class="flex flex-col gap-y-12 container p-10 max-w-2xl mx-auto">
33
<h1 class="text-3xl font-semibold">Demo Vue Stripe.js</h1>
44

55
<section>
@@ -13,6 +13,8 @@
1313
<PaymentElementDeferred />
1414
</section>
1515

16+
<hr class="border-gray-300">
17+
1618
<section>
1719
<h2 class="text-2xl font-semibold">Card Element</h2>
1820
<p class="pt-1 pb-4">More recent example. Stripe recommends using Payment Element instead of the Card -
@@ -24,12 +26,16 @@
2426
<CardElement />
2527
</section>
2628

29+
<hr class="border-gray-300">
30+
2731
<section>
2832
<h2 class="text-2xl font-semibold">Card Element (Legacy)</h2>
2933
<p class="pt-1 pb-4">How we implemented card payments a few years ago.</p>
3034
<CardElementLegacy />
3135
</section>
3236

37+
<hr class="border-gray-300">
38+
3339
<section>
3440
<h2 class="text-2xl font-semibold">Express Checkout Element</h2>
3541
<p class="pt-1 pb-4">Use your publishable key and enable relevant payment methods, e.g. PayPal -

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"scripts": {
1515
"dev": "vite",
1616
"build": "vue-tsc -b && vite build",
17+
"build:demo": "vite --config vite.demo.config.ts build",
1718
"check:types": "publint && attw --pack . --ignore-rules=cjs-resolves-to-esm",
1819
"ci": "biome check && pnpm run build && pnpm run check:types"
1920
},

vite.demo.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import tailwindcss from "@tailwindcss/vite"
2+
import vue from "@vitejs/plugin-vue"
3+
import { defineConfig } from "vite"
4+
5+
// https://vite.dev/config/
6+
export default defineConfig({
7+
plugins: [vue(), tailwindcss()],
8+
build: {
9+
outDir: "dist-demo",
10+
},
11+
})

vue-stripe-js.code-workspace

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
},
2121
"[jsonc]": {
2222
"editor.defaultFormatter": "biomejs.biome"
23+
},
24+
"[json]": {
25+
"editor.defaultFormatter": "biomejs.biome"
2326
}
2427
}
2528
}

0 commit comments

Comments
 (0)