@o2vend/theme-cli 1.0.32
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.
- package/README.md +425 -0
- package/assets/Logo_o2vend.png +0 -0
- package/assets/favicon.png +0 -0
- package/assets/logo-white.png +0 -0
- package/bin/o2vend +42 -0
- package/config/widget-map.json +50 -0
- package/lib/commands/check.js +201 -0
- package/lib/commands/generate.js +33 -0
- package/lib/commands/init.js +214 -0
- package/lib/commands/optimize.js +216 -0
- package/lib/commands/package.js +208 -0
- package/lib/commands/serve.js +105 -0
- package/lib/commands/validate.js +191 -0
- package/lib/lib/api-client.js +357 -0
- package/lib/lib/dev-server.js +2618 -0
- package/lib/lib/file-watcher.js +80 -0
- package/lib/lib/hot-reload.js +106 -0
- package/lib/lib/liquid-engine.js +822 -0
- package/lib/lib/liquid-filters.js +671 -0
- package/lib/lib/mock-api-server.js +989 -0
- package/lib/lib/mock-data.js +1468 -0
- package/lib/lib/widget-service.js +321 -0
- package/package.json +70 -0
- package/test-theme/README.md +27 -0
- package/test-theme/assets/async-sections.js +446 -0
- package/test-theme/assets/cart-drawer.js +463 -0
- package/test-theme/assets/cart-manager.js +223 -0
- package/test-theme/assets/checkout-price-handler.js +368 -0
- package/test-theme/assets/components.css +4629 -0
- package/test-theme/assets/delivery-zone.css +299 -0
- package/test-theme/assets/delivery-zone.js +396 -0
- package/test-theme/assets/logo.png +0 -0
- package/test-theme/assets/sections.css +48 -0
- package/test-theme/assets/theme.css +3500 -0
- package/test-theme/assets/theme.js +3745 -0
- package/test-theme/config/settings_data.json +292 -0
- package/test-theme/config/settings_schema.json +1050 -0
- package/test-theme/layout/theme.liquid +195 -0
- package/test-theme/locales/en.default.json +260 -0
- package/test-theme/sections/content-fallback.liquid +53 -0
- package/test-theme/sections/content.liquid +57 -0
- package/test-theme/sections/footer-fallback.liquid +328 -0
- package/test-theme/sections/footer.liquid +278 -0
- package/test-theme/sections/header-fallback.liquid +1805 -0
- package/test-theme/sections/header.liquid +1145 -0
- package/test-theme/sections/hero-fallback.liquid +212 -0
- package/test-theme/sections/hero.liquid +136 -0
- package/test-theme/snippets/account-sidebar.liquid +200 -0
- package/test-theme/snippets/add-to-cart-modal.liquid +484 -0
- package/test-theme/snippets/breadcrumbs.liquid +134 -0
- package/test-theme/snippets/cart-drawer.liquid +467 -0
- package/test-theme/snippets/delivery-zone-city-selector.liquid +79 -0
- package/test-theme/snippets/delivery-zone-modal.liquid +337 -0
- package/test-theme/snippets/delivery-zone-search.liquid +78 -0
- package/test-theme/snippets/icon.liquid +105 -0
- package/test-theme/snippets/login-modal.liquid +346 -0
- package/test-theme/snippets/mega-menu.liquid +812 -0
- package/test-theme/snippets/news-thumbnail.liquid +187 -0
- package/test-theme/snippets/pagination.liquid +120 -0
- package/test-theme/snippets/price.liquid +92 -0
- package/test-theme/snippets/product-card-related.liquid +78 -0
- package/test-theme/snippets/product-card-simple.liquid +41 -0
- package/test-theme/snippets/product-card.liquid +697 -0
- package/test-theme/snippets/rating.liquid +85 -0
- package/test-theme/snippets/skeleton-collection-grid.liquid +114 -0
- package/test-theme/snippets/skeleton-product-card.liquid +124 -0
- package/test-theme/snippets/skeleton-product-grid.liquid +34 -0
- package/test-theme/snippets/social-sharing.liquid +185 -0
- package/test-theme/templates/account/dashboard.liquid +401 -0
- package/test-theme/templates/account/loyalty-redemption.liquid +405 -0
- package/test-theme/templates/account/loyalty.liquid +588 -0
- package/test-theme/templates/account/order-detail.liquid +230 -0
- package/test-theme/templates/account/orders.liquid +349 -0
- package/test-theme/templates/account/profile.liquid +758 -0
- package/test-theme/templates/account/register.liquid +232 -0
- package/test-theme/templates/account/return-orders.liquid +348 -0
- package/test-theme/templates/account/store-credit.liquid +464 -0
- package/test-theme/templates/account/subscriptions.liquid +601 -0
- package/test-theme/templates/account/wishlist.liquid +419 -0
- package/test-theme/templates/address-book.liquid +1092 -0
- package/test-theme/templates/categories.liquid +452 -0
- package/test-theme/templates/checkout.liquid +4511 -0
- package/test-theme/templates/error.liquid +384 -0
- package/test-theme/templates/index.liquid +11 -0
- package/test-theme/templates/login.liquid +185 -0
- package/test-theme/templates/order-confirmation.liquid +720 -0
- package/test-theme/templates/page.liquid +297 -0
- package/test-theme/templates/product-detail.liquid +4363 -0
- package/test-theme/templates/products.liquid +518 -0
- package/test-theme/templates/search.liquid +922 -0
- package/test-theme/theme.json.example +19 -0
- package/test-theme/widgets/brand-carousel.liquid +676 -0
- package/test-theme/widgets/brand.liquid +245 -0
- package/test-theme/widgets/carousel.liquid +843 -0
- package/test-theme/widgets/category-list-carousel.liquid +656 -0
- package/test-theme/widgets/category-list.liquid +340 -0
- package/test-theme/widgets/category.liquid +475 -0
- package/test-theme/widgets/discount-time.liquid +176 -0
- package/test-theme/widgets/footer-menu.liquid +695 -0
- package/test-theme/widgets/footer.liquid +179 -0
- package/test-theme/widgets/gallery.liquid +271 -0
- package/test-theme/widgets/header-menu.liquid +932 -0
- package/test-theme/widgets/header.liquid +159 -0
- package/test-theme/widgets/html.liquid +214 -0
- package/test-theme/widgets/news.liquid +217 -0
- package/test-theme/widgets/product-canvas.liquid +235 -0
- package/test-theme/widgets/product-carousel.liquid +502 -0
- package/test-theme/widgets/product.liquid +45 -0
- package/test-theme/widgets/recently-viewed.liquid +26 -0
- package/test-theme/widgets/shared/product-grid.liquid +339 -0
- package/test-theme/widgets/simple-product.liquid +42 -0
- package/test-theme/widgets/single-product.liquid +610 -0
- package/test-theme/widgets/spacebar-carousel.liquid +663 -0
- package/test-theme/widgets/spacebar.liquid +279 -0
- package/test-theme/widgets/splash.liquid +378 -0
- package/test-theme/widgets/testimonial-carousel.liquid +709 -0
package/README.md
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
# O2VEND Theme CLI
|
|
2
|
+
|
|
3
|
+
**Standalone command-line tool for developing O2VEND themes locally.**
|
|
4
|
+
|
|
5
|
+
The O2VEND Theme CLI is a complete development environment for creating, testing, and packaging O2VEND themes. It works independently and doesn't require access to the main O2VEND webstore solution.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Install globally via npm:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g @o2vend/theme-cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Verify installation:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
o2vend --version
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
### 1. Get Started with a Theme
|
|
24
|
+
|
|
25
|
+
**Option A: Use the O2VEND Theme Starter (Recommended)**
|
|
26
|
+
|
|
27
|
+
Clone the ready-to-use starter template:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
git clone https://github.com/Jeyan-Technologies/o2vend-theme-starter.git
|
|
31
|
+
cd o2vend-theme-starter
|
|
32
|
+
npm run setup
|
|
33
|
+
o2vend serve
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Option B: Create a New Theme**
|
|
37
|
+
|
|
38
|
+
Initialize a new theme from scratch:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
o2vend init my-theme
|
|
42
|
+
cd my-theme
|
|
43
|
+
o2vend serve
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 2. Start Development Server
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
o2vend serve
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This will:
|
|
53
|
+
- Start a local development server at `http://localhost:3000`
|
|
54
|
+
- Launch a mock API server for testing
|
|
55
|
+
- Enable hot reload for instant preview
|
|
56
|
+
- Open your browser automatically
|
|
57
|
+
|
|
58
|
+
## Commands
|
|
59
|
+
|
|
60
|
+
### `serve`
|
|
61
|
+
|
|
62
|
+
Start development server with hot reload:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
o2vend serve [options]
|
|
66
|
+
|
|
67
|
+
Options:
|
|
68
|
+
-m, --mode <mode> API mode (mock|real) [default: mock]
|
|
69
|
+
-p, --port <port> Server port [default: 3000]
|
|
70
|
+
--host <host> Server host [default: localhost]
|
|
71
|
+
-t, --theme <themePath> Path to theme directory [default: current]
|
|
72
|
+
-e, --env <envFile> Path to .env file [default: .env]
|
|
73
|
+
--open Open browser automatically [default: true]
|
|
74
|
+
--no-open Don't open browser
|
|
75
|
+
--mock-api-port <port> Mock API port [default: 3001]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Examples:**
|
|
79
|
+
```bash
|
|
80
|
+
# Start in mock mode (default) - works offline
|
|
81
|
+
o2vend serve
|
|
82
|
+
|
|
83
|
+
# Connect to real O2VEND API
|
|
84
|
+
o2vend serve --mode real
|
|
85
|
+
|
|
86
|
+
# Custom port
|
|
87
|
+
o2vend serve --port 8080
|
|
88
|
+
|
|
89
|
+
# Don't open browser automatically
|
|
90
|
+
o2vend serve --no-open
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### `init <name>`
|
|
94
|
+
|
|
95
|
+
Initialize a new theme project:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
o2vend init my-theme
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Creates a new theme directory with:
|
|
102
|
+
- Complete theme structure (templates, sections, widgets, assets)
|
|
103
|
+
- Configuration files (`settings_schema.json`, `settings_data.json`)
|
|
104
|
+
- Example templates and widgets
|
|
105
|
+
- VS Code configuration
|
|
106
|
+
- `.env` file template
|
|
107
|
+
|
|
108
|
+
### `validate`
|
|
109
|
+
|
|
110
|
+
Validate theme structure and configuration:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
o2vend validate
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Checks for:
|
|
117
|
+
- Required theme files and directories
|
|
118
|
+
- Valid Liquid syntax
|
|
119
|
+
- Proper theme structure
|
|
120
|
+
- Configuration file validity
|
|
121
|
+
- Widget template compatibility
|
|
122
|
+
|
|
123
|
+
### `check`
|
|
124
|
+
|
|
125
|
+
Check theme for issues and best practices:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
o2vend check
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Performs various checks:
|
|
132
|
+
- Syntax errors in Liquid templates
|
|
133
|
+
- Missing required files
|
|
134
|
+
- Performance issues
|
|
135
|
+
- Accessibility concerns
|
|
136
|
+
- Best practice violations
|
|
137
|
+
|
|
138
|
+
### `optimize`
|
|
139
|
+
|
|
140
|
+
Analyze and optimize theme performance:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
o2vend optimize
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Provides analysis for:
|
|
147
|
+
- CSS file sizes
|
|
148
|
+
- JavaScript file sizes
|
|
149
|
+
- Image optimization opportunities
|
|
150
|
+
- Asset bundling recommendations
|
|
151
|
+
- Performance metrics
|
|
152
|
+
|
|
153
|
+
### `package`
|
|
154
|
+
|
|
155
|
+
Package theme for O2VEND marketplace submission:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
o2vend package [options]
|
|
159
|
+
|
|
160
|
+
Options:
|
|
161
|
+
-o, --output <path> Output ZIP file path [default: dist/theme.zip]
|
|
162
|
+
--validate Run validation before packaging
|
|
163
|
+
--theme-id <id> Theme ID for theme.json
|
|
164
|
+
--theme-name <name> Theme name for theme.json
|
|
165
|
+
--theme-version <version> Theme version for theme.json
|
|
166
|
+
--author <author> Author name for theme.json
|
|
167
|
+
--description <description> Theme description for theme.json
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Creates a marketplace-ready ZIP file with:
|
|
171
|
+
- `theme.json` manifest (auto-generated if missing)
|
|
172
|
+
- All theme files
|
|
173
|
+
- Optional `migrations` folder
|
|
174
|
+
- Proper file structure
|
|
175
|
+
|
|
176
|
+
## Environment Variables
|
|
177
|
+
|
|
178
|
+
Create a `.env` file in your theme directory:
|
|
179
|
+
|
|
180
|
+
```env
|
|
181
|
+
# API Configuration (for real API mode)
|
|
182
|
+
O2VEND_TENANT_ID=your-tenant-id
|
|
183
|
+
O2VEND_API_KEY=your-api-key
|
|
184
|
+
O2VEND_API_BASE_URL=https://api.o2vend.com
|
|
185
|
+
|
|
186
|
+
# Development Server
|
|
187
|
+
PORT=3000
|
|
188
|
+
HOST=localhost
|
|
189
|
+
MOCK_API_PORT=3001
|
|
190
|
+
|
|
191
|
+
# Options
|
|
192
|
+
OPEN_BROWSER=true
|
|
193
|
+
DEBUG_API_ERRORS=false
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
| Variable | Description | Default |
|
|
197
|
+
|----------|-------------|---------|
|
|
198
|
+
| `O2VEND_TENANT_ID` | Tenant ID (real mode) | - |
|
|
199
|
+
| `O2VEND_API_KEY` | API Key (real mode) | - |
|
|
200
|
+
| `O2VEND_API_BASE_URL` | API Base URL (real mode) | - |
|
|
201
|
+
| `PORT` | Development server port | `3000` |
|
|
202
|
+
| `HOST` | Development server host | `localhost` |
|
|
203
|
+
| `MOCK_API_PORT` | Mock API server port | `3001` |
|
|
204
|
+
| `OPEN_BROWSER` | Auto-open browser | `true` |
|
|
205
|
+
| `DEBUG_API_ERRORS` | Debug API errors | `false` |
|
|
206
|
+
|
|
207
|
+
## Features
|
|
208
|
+
|
|
209
|
+
### Hot Reload
|
|
210
|
+
|
|
211
|
+
Automatic browser refresh on file changes:
|
|
212
|
+
- **CSS changes** - Injected without page reload
|
|
213
|
+
- **Liquid/JS changes** - Full page reload
|
|
214
|
+
- **File watching** - Automatic change detection
|
|
215
|
+
- **WebSocket-based** - Real-time updates
|
|
216
|
+
|
|
217
|
+
### Mock API
|
|
218
|
+
|
|
219
|
+
Built-in mock API provides realistic test data for offline development:
|
|
220
|
+
- Products (20+ sample items)
|
|
221
|
+
- Categories (10+ sample items)
|
|
222
|
+
- Brands (8+ sample items)
|
|
223
|
+
- Widgets (multiple sections: hero, products, footer)
|
|
224
|
+
- Store information
|
|
225
|
+
- Shopping cart simulation
|
|
226
|
+
|
|
227
|
+
Perfect for:
|
|
228
|
+
- Developing themes without API access
|
|
229
|
+
- Testing theme layouts
|
|
230
|
+
- Prototyping new designs
|
|
231
|
+
- Learning O2VEND theme structure
|
|
232
|
+
|
|
233
|
+
### Real API Mode
|
|
234
|
+
|
|
235
|
+
Connect to actual O2VEND Storefront API:
|
|
236
|
+
- Full API compatibility
|
|
237
|
+
- Authentication support
|
|
238
|
+
- Widget loading from API
|
|
239
|
+
- Real-time data from your tenant
|
|
240
|
+
- Product, category, and brand data
|
|
241
|
+
|
|
242
|
+
### Theme Structure
|
|
243
|
+
|
|
244
|
+
O2VEND themes follow a specific structure:
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
theme/
|
|
248
|
+
├── layout/
|
|
249
|
+
│ └── theme.liquid # Main layout template
|
|
250
|
+
├── templates/
|
|
251
|
+
│ ├── index.liquid # Homepage
|
|
252
|
+
│ ├── product.liquid # Product page
|
|
253
|
+
│ ├── collection.liquid # Collection page
|
|
254
|
+
│ └── ...
|
|
255
|
+
├── sections/
|
|
256
|
+
│ ├── header.liquid
|
|
257
|
+
│ ├── footer.liquid
|
|
258
|
+
│ └── ...
|
|
259
|
+
├── widgets/
|
|
260
|
+
│ ├── product.liquid
|
|
261
|
+
│ ├── banner.liquid
|
|
262
|
+
│ └── ...
|
|
263
|
+
├── snippets/
|
|
264
|
+
│ └── ...
|
|
265
|
+
├── assets/
|
|
266
|
+
│ ├── theme.css
|
|
267
|
+
│ ├── theme.js
|
|
268
|
+
│ └── ...
|
|
269
|
+
└── config/
|
|
270
|
+
├── settings_schema.json
|
|
271
|
+
└── settings_data.json
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Important:** Templates, sections, and widgets are **predefined by O2VEND** and come from the O2VEND Storefront API. You can customize existing files but **cannot create new templates, sections, or widget types**.
|
|
275
|
+
|
|
276
|
+
## Usage Examples
|
|
277
|
+
|
|
278
|
+
### Development Workflow
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
# 1. Start development server
|
|
282
|
+
o2vend serve
|
|
283
|
+
|
|
284
|
+
# 2. Make changes to theme files
|
|
285
|
+
# Edit templates, sections, widgets, or assets
|
|
286
|
+
|
|
287
|
+
# 3. Validate theme structure
|
|
288
|
+
o2vend validate
|
|
289
|
+
|
|
290
|
+
# 4. Check for issues
|
|
291
|
+
o2vend check
|
|
292
|
+
|
|
293
|
+
# 5. Optimize assets
|
|
294
|
+
o2vend optimize
|
|
295
|
+
|
|
296
|
+
# 6. Package for marketplace
|
|
297
|
+
o2vend package
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Connecting to Real API
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
# Create .env file
|
|
304
|
+
cat > .env << EOF
|
|
305
|
+
O2VEND_TENANT_ID=your-tenant-id
|
|
306
|
+
O2VEND_API_KEY=your-api-key
|
|
307
|
+
O2VEND_API_BASE_URL=https://api.o2vend.com
|
|
308
|
+
EOF
|
|
309
|
+
|
|
310
|
+
# Start server in real mode
|
|
311
|
+
o2vend serve --mode real
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Custom Theme Development
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
# Create new theme
|
|
318
|
+
o2vend init my-custom-theme
|
|
319
|
+
|
|
320
|
+
# Navigate to theme
|
|
321
|
+
cd my-custom-theme
|
|
322
|
+
|
|
323
|
+
# Start development
|
|
324
|
+
o2vend serve
|
|
325
|
+
|
|
326
|
+
# Customize theme files
|
|
327
|
+
# Edit theme/layout/theme.liquid
|
|
328
|
+
# Edit theme/templates/index.liquid
|
|
329
|
+
# Edit theme/assets/theme.css
|
|
330
|
+
|
|
331
|
+
# Validate and package
|
|
332
|
+
o2vend validate
|
|
333
|
+
o2vend package
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
## Theme Development Guidelines
|
|
337
|
+
|
|
338
|
+
### Customizing Templates
|
|
339
|
+
|
|
340
|
+
Modify files in `theme/templates/` to change page layouts. For example:
|
|
341
|
+
- `templates/index.liquid` - Homepage
|
|
342
|
+
- `templates/product.liquid` - Product detail page
|
|
343
|
+
- `templates/collection.liquid` - Collection listing page
|
|
344
|
+
|
|
345
|
+
**Note:** All templates are provided by O2VEND. You can customize them but cannot create new ones.
|
|
346
|
+
|
|
347
|
+
### Customizing Sections
|
|
348
|
+
|
|
349
|
+
Modify files in `theme/sections/` to change reusable content blocks:
|
|
350
|
+
- `sections/header.liquid` - Site header
|
|
351
|
+
- `sections/footer.liquid` - Site footer
|
|
352
|
+
- `sections/hero.liquid` - Hero banner section
|
|
353
|
+
|
|
354
|
+
**Note:** All sections are provided by O2VEND. You can customize them but cannot create new ones.
|
|
355
|
+
|
|
356
|
+
### Customizing Widgets
|
|
357
|
+
|
|
358
|
+
Modify files in `theme/widgets/` to change how dynamic content components are rendered:
|
|
359
|
+
- `widgets/product.liquid` - Product display widget
|
|
360
|
+
- `widgets/banner.liquid` - Banner widget
|
|
361
|
+
- `widgets/carousel.liquid` - Carousel widget
|
|
362
|
+
|
|
363
|
+
**Note:** Widget templates are provided by O2VEND. Widgets themselves are managed through the O2VEND admin panel and loaded via the Storefront API. You can customize widget templates but cannot create new widget types.
|
|
364
|
+
|
|
365
|
+
### Customizing Assets
|
|
366
|
+
|
|
367
|
+
Modify files in `theme/assets/` for CSS, JavaScript, and images:
|
|
368
|
+
- `assets/theme.css` - Main stylesheet
|
|
369
|
+
- `assets/theme.js` - Main JavaScript
|
|
370
|
+
- `assets/components.css` - Component styles
|
|
371
|
+
|
|
372
|
+
## Troubleshooting
|
|
373
|
+
|
|
374
|
+
### Port Already in Use
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
# Use a different port
|
|
378
|
+
o2vend serve --port 8080
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Layout Not Found Error
|
|
382
|
+
|
|
383
|
+
Make sure your templates use the correct layout path:
|
|
384
|
+
```liquid
|
|
385
|
+
{% layout 'layout/theme' %}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
The layout file should be at: `theme/layout/theme.liquid`
|
|
389
|
+
|
|
390
|
+
### API Connection Issues
|
|
391
|
+
|
|
392
|
+
If using real API mode:
|
|
393
|
+
1. Verify `.env` file has correct credentials
|
|
394
|
+
2. Check API base URL is correct
|
|
395
|
+
3. Ensure tenant ID and API key are valid
|
|
396
|
+
4. Try mock mode first: `o2vend serve --mode mock`
|
|
397
|
+
|
|
398
|
+
### Hot Reload Not Working
|
|
399
|
+
|
|
400
|
+
1. Check browser console for WebSocket errors
|
|
401
|
+
2. Verify firewall isn't blocking WebSocket connections
|
|
402
|
+
3. Try refreshing the page manually
|
|
403
|
+
4. Restart the server: `o2vend serve`
|
|
404
|
+
|
|
405
|
+
## Support & Resources
|
|
406
|
+
|
|
407
|
+
- **[O2VEND Developer Documentation](https://o2vend.com/developer/)** - Complete API documentation and guides
|
|
408
|
+
- **Support Email:** support@o2vend.com or developer@jeyantechnologies.com
|
|
409
|
+
- **Support Desk:** [O2VEND Support Portal](https://o2vend.atlassian.net/servicedesk/customer/portals)
|
|
410
|
+
- **Community:** [O2VEND Community Program](https://o2vend.com/community)
|
|
411
|
+
- **Partnership:** [O2VEND Partnership Program](https://o2vend.com/partnership)
|
|
412
|
+
- **Developer Portal:** [www.o2vend.com](https://www.o2vend.com)
|
|
413
|
+
|
|
414
|
+
## Related Tools
|
|
415
|
+
|
|
416
|
+
- **[O2VEND Theme Starter](https://github.com/Jeyan-Technologies/o2vend-theme-starter)** - Ready-to-use starter template with complete default theme
|
|
417
|
+
- **[O2VEND Liquid VS Code Extension](https://marketplace.visualstudio.com/items?itemName=O2VEND.o2vend-liquid)** - Syntax highlighting and IntelliSense for O2VEND Liquid templates
|
|
418
|
+
|
|
419
|
+
## License
|
|
420
|
+
|
|
421
|
+
MIT License - See LICENSE file
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
**Ready to build amazing O2VEND themes?** Start with the [O2VEND Theme Starter](https://github.com/Jeyan-Technologies/o2vend-theme-starter) or create your own with `o2vend init`!
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/o2vend
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* O2VEND Theme CLI Entry Point
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const { program } = require('commander');
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
|
|
11
|
+
// For development: use src/ if it exists, otherwise use lib/
|
|
12
|
+
const srcDir = path.join(__dirname, '../src');
|
|
13
|
+
const libDir = path.join(__dirname, '../lib');
|
|
14
|
+
const commandsDir = fs.existsSync(path.join(srcDir, 'commands')) ? srcDir : libDir;
|
|
15
|
+
|
|
16
|
+
const initCommand = require(path.join(commandsDir, 'commands/init'));
|
|
17
|
+
const serveCommand = require(path.join(commandsDir, 'commands/serve'));
|
|
18
|
+
const validateCommand = require(path.join(commandsDir, 'commands/validate'));
|
|
19
|
+
const checkCommand = require(path.join(commandsDir, 'commands/check'));
|
|
20
|
+
const generateCommand = require(path.join(commandsDir, 'commands/generate'));
|
|
21
|
+
const optimizeCommand = require(path.join(commandsDir, 'commands/optimize'));
|
|
22
|
+
const packageCommand = require(path.join(commandsDir, 'commands/package'));
|
|
23
|
+
|
|
24
|
+
const packageJson = require('../package.json');
|
|
25
|
+
|
|
26
|
+
program
|
|
27
|
+
.name('o2vend')
|
|
28
|
+
.description('O2VEND Theme Development CLI')
|
|
29
|
+
.version(packageJson.version);
|
|
30
|
+
|
|
31
|
+
// Add commands directly (no nested 'theme' command)
|
|
32
|
+
program
|
|
33
|
+
.addCommand(initCommand)
|
|
34
|
+
.addCommand(serveCommand)
|
|
35
|
+
.addCommand(validateCommand)
|
|
36
|
+
.addCommand(checkCommand)
|
|
37
|
+
.addCommand(generateCommand)
|
|
38
|
+
.addCommand(optimizeCommand)
|
|
39
|
+
.addCommand(packageCommand);
|
|
40
|
+
|
|
41
|
+
program.parse();
|
|
42
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"BannerWidget": "carousel",
|
|
3
|
+
"Banner": "carousel",
|
|
4
|
+
"BrandWidget": "brand",
|
|
5
|
+
"Brand": "brand",
|
|
6
|
+
"BrandWidgetCarousel": "brand-carousel",
|
|
7
|
+
"BrandCarousel": "brand-carousel",
|
|
8
|
+
"CarouselWidget": "carousel",
|
|
9
|
+
"Carousel": "carousel",
|
|
10
|
+
"CategoryListCarouselWidget": "category-list-carousel",
|
|
11
|
+
"CategoryListCarousel": "category-list-carousel",
|
|
12
|
+
"CategoryListWidget": "category-list",
|
|
13
|
+
"CategoryList": "category-list",
|
|
14
|
+
"CategoryWidget": "category",
|
|
15
|
+
"Category": "category",
|
|
16
|
+
"DiscountTimeWidget": "discount-time",
|
|
17
|
+
"DiscountTime": "discount-time",
|
|
18
|
+
"FooterWidget": "footer",
|
|
19
|
+
"FooterMenu": "footer-menu",
|
|
20
|
+
"GalleryWidget": "gallery",
|
|
21
|
+
"Gallery": "gallery",
|
|
22
|
+
"HeaderWidget": "header",
|
|
23
|
+
"HeaderMenu": "header-menu",
|
|
24
|
+
"HtmlWidget": "html",
|
|
25
|
+
"Html": "html",
|
|
26
|
+
"NewsWidget": "news",
|
|
27
|
+
"News": "news",
|
|
28
|
+
"ProductCanvasWidget": "product-canvas",
|
|
29
|
+
"ProductCanvas": "product-canvas",
|
|
30
|
+
"ProductCarouselWidget": "product-carousel",
|
|
31
|
+
"ProductCarousel": "product-carousel",
|
|
32
|
+
"ProductGridWidget": "product-grid",
|
|
33
|
+
"ProductGrid": "product-grid",
|
|
34
|
+
"ProductWidget": "product",
|
|
35
|
+
"Product": "product",
|
|
36
|
+
"RecentlyViewedWidget": "recently-viewed",
|
|
37
|
+
"RecentlyViewed": "recently-viewed",
|
|
38
|
+
"SimpleProductWidget": "simple-product",
|
|
39
|
+
"SimpleProduct": "simple-product",
|
|
40
|
+
"SingleProductWidget": "single-product",
|
|
41
|
+
"SingleProduct": "single-product",
|
|
42
|
+
"SpaceBarWidget": "spacebar",
|
|
43
|
+
"SpaceBar": "spacebar",
|
|
44
|
+
"SpaceBarWidgetCarousel": "spacebar-carousel",
|
|
45
|
+
"SpaceBarCarousel": "spacebar-carousel",
|
|
46
|
+
"SplashWidget": "splash",
|
|
47
|
+
"Splash": "splash",
|
|
48
|
+
"TestimonialCarousel": "testimonial-carousel"
|
|
49
|
+
}
|
|
50
|
+
|