@pradip1995/create-storefront-app 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,12 +8,9 @@ import { buildDependencies } from "../lib/deps.js"
8
8
  const __dirname = dirname(fileURLToPath(import.meta.url))
9
9
  const PKG_ROOT = join(__dirname, "..")
10
10
 
11
- const THEME_MAP = { valero: "valero", impulse: "impulse", sahsha: "impulse" }
12
-
13
11
  function parseArgs(argv) {
14
12
  const args = {
15
13
  preset: "full",
16
- theme: "valero",
17
14
  dir: process.cwd(),
18
15
  backendUrl: "http://localhost:9000",
19
16
  baseUrl: "http://localhost:8000",
@@ -28,7 +25,6 @@ function parseArgs(argv) {
28
25
  for (let i = 2; i < argv.length; i++) {
29
26
  const arg = argv[i]
30
27
  if (arg === "--preset" && argv[i + 1]) args.preset = argv[++i]
31
- else if (arg === "--theme" && argv[i + 1]) args.theme = argv[++i]
32
28
  else if (arg === "--dir" && argv[i + 1]) args.dir = resolve(argv[++i])
33
29
  else if (arg === "--backend-url" && argv[i + 1]) args.backendUrl = argv[++i]
34
30
  else if (arg === "--publishable-key" && argv[i + 1]) args.publishableKey = argv[++i]
@@ -54,7 +50,6 @@ Usage:
54
50
 
55
51
  Options:
56
52
  --preset <full|minimal> Page/segment preset (default: full)
57
- --theme <valero|impulse> CSS theme token set (default: valero)
58
53
  --dir <path> Parent directory (default: cwd)
59
54
  --backend-url <url> Medusa backend URL (default: http://localhost:9000)
60
55
  --publishable-key <key> Medusa publishable API key (default: pk_test)
@@ -66,7 +61,7 @@ Options:
66
61
 
67
62
  Examples:
68
63
  npx @pradip1995/create-storefront-app my-shop
69
- npx @pradip1995/create-storefront-app my-shop --preset minimal --theme impulse \\
64
+ npx @pradip1995/create-storefront-app my-shop --preset minimal \\
70
65
  --publishable-key pk_xxx --backend-url http://localhost:9000
71
66
  `)
72
67
  }
@@ -92,7 +87,6 @@ function scaffoldProject(args) {
92
87
  process.exit(1)
93
88
  }
94
89
 
95
- const cssTheme = THEME_MAP[args.theme] || args.theme
96
90
  mkdirSync(projectRoot, { recursive: true })
97
91
  mkdirSync(join(projectRoot, "public"), { recursive: true })
98
92
 
@@ -104,7 +98,6 @@ function scaffoldProject(args) {
104
98
  const storefrontConfig = JSON.parse(
105
99
  readFileSync(join(PKG_ROOT, "templates/shared/storefront.config.json"), "utf8")
106
100
  )
107
- storefrontConfig.theme = cssTheme
108
101
  storefrontConfig.defaultCountryCode = args.defaultRegion
109
102
  writeJson(join(projectRoot, "storefront.config.json"), storefrontConfig)
110
103
 
@@ -132,7 +125,6 @@ function scaffoldProject(args) {
132
125
  BASE_URL: args.baseUrl,
133
126
  DEFAULT_REGION: args.defaultRegion,
134
127
  PUBLISHABLE_KEY: args.publishableKey,
135
- THEME: args.theme,
136
128
  })
137
129
  )
138
130
  writeFileSync(
@@ -142,7 +134,6 @@ function scaffoldProject(args) {
142
134
  BASE_URL: "http://localhost:8000",
143
135
  DEFAULT_REGION: "in",
144
136
  PUBLISHABLE_KEY: "pk_test",
145
- THEME: "valero",
146
137
  })
147
138
  )
148
139
 
@@ -170,7 +161,7 @@ function main() {
170
161
  }
171
162
 
172
163
  console.log(
173
- `Creating storefront "${args.name}" (preset: ${args.preset}, theme: ${args.theme})...`
164
+ `Creating storefront "${args.name}" (preset: ${args.preset})...`
174
165
  )
175
166
 
176
167
  const projectRoot = scaffoldProject(args)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pradip1995/create-storefront-app",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Scaffold a segment-based Medusa storefront using @pradip1995/framework packages",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -4,7 +4,11 @@ NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY={{PUBLISHABLE_KEY}}
4
4
  NEXT_PUBLIC_MEDUSA_BACKEND_URL={{BACKEND_URL}}
5
5
  NEXT_PUBLIC_BASE_URL={{BASE_URL}}
6
6
  NEXT_PUBLIC_DEFAULT_REGION={{DEFAULT_REGION}}
7
- NEXT_PUBLIC_STOREFRONT_THEME={{THEME}}
7
+
8
+ # Branding (shown in nav, hero fallbacks, promo bar)
9
+ # NEXT_PUBLIC_SHOP_NAME=My Shop
10
+ # NEXT_PUBLIC_HOME_PAGE_TITLE=Welcome to our store
11
+ # NEXT_PUBLIC_HOME_PAGE_DESCRIPTION=
8
12
 
9
13
  # Payments (Razorpay test — replace for production)
10
14
  # NEXT_PUBLIC_RAZORPAY_KEY=
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 600" preserveAspectRatio="xMidYMid slice">
2
+ <defs>
3
+ <linearGradient id="hero" x1="0%" y1="0%" x2="100%" y2="0%">
4
+ <stop offset="0%" stop-color="#dbeafe"/>
5
+ <stop offset="100%" stop-color="#93c5fd"/>
6
+ </linearGradient>
7
+ </defs>
8
+ <rect width="1440" height="600" fill="url(#hero)"/>
9
+ </svg>
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 960" preserveAspectRatio="xMidYMid slice">
2
+ <defs>
3
+ <linearGradient id="hero-m" x1="0%" y1="0%" x2="0%" y2="100%">
4
+ <stop offset="0%" stop-color="#dbeafe"/>
5
+ <stop offset="100%" stop-color="#93c5fd"/>
6
+ </linearGradient>
7
+ </defs>
8
+ <rect width="750" height="960" fill="url(#hero-m)"/>
9
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 48" fill="none">
2
+ <text x="0" y="34" font-family="system-ui, sans-serif" font-size="26" font-weight="700" fill="#2563eb">Valero</text>
3
+ </svg>
@@ -1,5 +1,4 @@
1
1
  {
2
- "theme": "valero",
3
2
  "defaultCountryCode": "in",
4
3
  "loader": {
5
4
  "variant": "spinner",