easyorders 0.1.16 → 0.1.17
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 +2 -2
- package/dist/bin/cli.js +22 -8
- package/dist/server/index.js +10 -7
- package/dist/template/theme/config.json +24 -26
- package/dist/template/theme/home-sections/category-mosaic/config.json +125 -125
- package/dist/template/theme/home-sections/category-mosaic/template.liquid +170 -170
- package/dist/template/theme/home-sections/editorial-feature/config.json +93 -93
- package/dist/template/theme/home-sections/editorial-feature/template.liquid +154 -154
- package/dist/template/theme/home-sections/newsletter-luxe/config.json +86 -86
- package/dist/template/theme/home-sections/newsletter-luxe/template.liquid +150 -150
- package/dist/template/theme/home-sections/runway-hero/config.json +148 -148
- package/dist/template/theme/home-sections/runway-hero/template.liquid +189 -189
- package/dist/template/theme/home-sections/shop-the-look/config.json +167 -167
- package/dist/template/theme/home-sections/shop-the-look/template.liquid +326 -326
- package/dist/template/theme/home-sections/trust-promise/config.json +121 -121
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npm install -g easyorders
|
|
|
21
21
|
### Create a new theme project
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
easyorders create
|
|
24
|
+
easyorders create my-theme
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
This scaffolds a new directory `my-theme/` containing only the `theme/` folder and a minimal `package.json`. No server code is included — the server runs from the CLI package itself.
|
|
@@ -57,7 +57,7 @@ Create a `.env` file in your theme project root (or export the variables) to cus
|
|
|
57
57
|
|
|
58
58
|
## Theme Project Structure
|
|
59
59
|
|
|
60
|
-
After running `create
|
|
60
|
+
After running `create`, your project will look like:
|
|
61
61
|
|
|
62
62
|
```
|
|
63
63
|
my-theme/
|
package/dist/bin/cli.js
CHANGED
|
@@ -95,7 +95,7 @@ async function startDev() {
|
|
|
95
95
|
const themeDir = path.join(cwd, "theme");
|
|
96
96
|
if (!fs.existsSync(themeDir)) {
|
|
97
97
|
console.error(`\n ${RED}${BOLD}✖ No "theme" folder found in the current directory.${RESET}`);
|
|
98
|
-
console.error(` ${DIM}Run ${CYAN}npx easyorders create
|
|
98
|
+
console.error(` ${DIM}Run ${CYAN}npx easyorders create <name>${DIM} first to create a project.${RESET}\n`);
|
|
99
99
|
process.exit(1);
|
|
100
100
|
}
|
|
101
101
|
// The server files are bundled inside the CLI package
|
|
@@ -139,8 +139,9 @@ function showMenu() {
|
|
|
139
139
|
console.log(` ${CYAN}${BOLD}Easy Orders CLI${RESET}`);
|
|
140
140
|
console.log("");
|
|
141
141
|
console.log(` ${BOLD}Usage:${RESET}`);
|
|
142
|
-
console.log(` ${CYAN}npx easyorders create
|
|
142
|
+
console.log(` ${CYAN}npx easyorders create ${DIM}<name>${RESET} Create a new theme project`);
|
|
143
143
|
console.log(` ${CYAN}npx easyorders start${RESET} Start the dev server`);
|
|
144
|
+
console.log(` ${CYAN}npx easyorders -v${RESET} Show CLI version`);
|
|
144
145
|
console.log("");
|
|
145
146
|
}
|
|
146
147
|
async function interactiveMenu() {
|
|
@@ -165,12 +166,19 @@ async function interactiveMenu() {
|
|
|
165
166
|
process.exit(1);
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
|
-
// ── Version
|
|
169
|
-
|
|
169
|
+
// ── Version ─────────────────────────────────────────────────
|
|
170
|
+
function getPackageInfo() {
|
|
170
171
|
const pkgPath = path.resolve(__dirname, "..", "..", "package.json");
|
|
171
172
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
return { name: pkg.name, version: pkg.version };
|
|
174
|
+
}
|
|
175
|
+
function showVersion() {
|
|
176
|
+
const { version } = getPackageInfo();
|
|
177
|
+
console.log(version);
|
|
178
|
+
}
|
|
179
|
+
// ── Version check ───────────────────────────────────────────
|
|
180
|
+
async function checkForUpdates() {
|
|
181
|
+
const { name: packageName, version: localVersion } = getPackageInfo();
|
|
174
182
|
try {
|
|
175
183
|
const res = await fetch(`https://registry.npmjs.org/${packageName}/latest`);
|
|
176
184
|
if (!res.ok)
|
|
@@ -193,13 +201,18 @@ async function checkForUpdates() {
|
|
|
193
201
|
}
|
|
194
202
|
// ── Entry point ─────────────────────────────────────────────
|
|
195
203
|
(async () => {
|
|
196
|
-
await checkForUpdates();
|
|
197
204
|
const command = process.argv[2];
|
|
198
205
|
switch (command) {
|
|
199
|
-
case "
|
|
206
|
+
case "-v":
|
|
207
|
+
case "--version":
|
|
208
|
+
showVersion();
|
|
209
|
+
break;
|
|
210
|
+
case "create":
|
|
211
|
+
await checkForUpdates();
|
|
200
212
|
await createTheme();
|
|
201
213
|
break;
|
|
202
214
|
case "start":
|
|
215
|
+
await checkForUpdates();
|
|
203
216
|
await startDev();
|
|
204
217
|
break;
|
|
205
218
|
case "--help":
|
|
@@ -207,6 +220,7 @@ async function checkForUpdates() {
|
|
|
207
220
|
showMenu();
|
|
208
221
|
break;
|
|
209
222
|
default:
|
|
223
|
+
await checkForUpdates();
|
|
210
224
|
await interactiveMenu();
|
|
211
225
|
break;
|
|
212
226
|
}
|
package/dist/server/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import express from "express";
|
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import readline from "node:readline";
|
|
7
|
-
import {
|
|
7
|
+
import { execFile } from "node:child_process";
|
|
8
8
|
import { generateCliToken, checkTokenStatus } from "./api.js";
|
|
9
9
|
import { getToken, saveToken } from "./token-store.js";
|
|
10
10
|
const CYAN = "\x1b[36m";
|
|
@@ -116,12 +116,15 @@ function promptStoreName() {
|
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
function openBrowser(url) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
119
|
+
if (process.platform === "darwin") {
|
|
120
|
+
execFile("open", [url]);
|
|
121
|
+
}
|
|
122
|
+
else if (process.platform === "win32") {
|
|
123
|
+
execFile("cmd", ["/c", "start", "", url], { windowsHide: true });
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
execFile("xdg-open", [url]);
|
|
127
|
+
}
|
|
125
128
|
}
|
|
126
129
|
function waitForApproval(tokenId) {
|
|
127
130
|
return new Promise((resolve, reject) => {
|
|
@@ -3,28 +3,38 @@
|
|
|
3
3
|
"logo": "",
|
|
4
4
|
"pages": [
|
|
5
5
|
{
|
|
6
|
-
"id": "
|
|
7
|
-
"type": "page"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"id": "97f8d618-dce3-4d1c-bcf3-75284532d2da",
|
|
11
|
-
"type": "page"
|
|
6
|
+
"id": "ADD_PAGE_ID_HERE"
|
|
12
7
|
}
|
|
13
8
|
],
|
|
14
9
|
"social": [
|
|
15
10
|
{
|
|
16
|
-
"
|
|
17
|
-
"
|
|
11
|
+
"url": "https://facebook.com",
|
|
12
|
+
"type": "facebook"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"url": "https://facebook.com",
|
|
16
|
+
"type": "instagram"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"url": "https://facebook.com",
|
|
20
|
+
"type": "twitter"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"url": "https://facebook.com",
|
|
24
|
+
"type": "linkedin"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"url": "https://facebook.com",
|
|
28
|
+
"type": "tiktok"
|
|
18
29
|
},
|
|
19
30
|
{
|
|
20
|
-
"
|
|
21
|
-
"
|
|
31
|
+
"url": "https://facebook.com",
|
|
32
|
+
"type": "youtube"
|
|
22
33
|
}
|
|
23
34
|
],
|
|
24
35
|
"categories": [
|
|
25
36
|
{
|
|
26
|
-
"id": "
|
|
27
|
-
"type": "category"
|
|
37
|
+
"id": "ADD_CATEGORY_ID_HERE"
|
|
28
38
|
}
|
|
29
39
|
],
|
|
30
40
|
"payment_img": "https://easyorders.fra1.digitaloceanspaces.com/1773958283329740254payment_icons.svg",
|
|
@@ -34,23 +44,11 @@
|
|
|
34
44
|
"logo": "",
|
|
35
45
|
"links": [
|
|
36
46
|
{
|
|
37
|
-
"id": "
|
|
38
|
-
"type": "category"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"id": "a43e3bbe-afaf-4f96-b2a8-609574c618be",
|
|
47
|
+
"id": "ADD_CATEGORY_ID_HERE",
|
|
42
48
|
"type": "category"
|
|
43
49
|
},
|
|
44
50
|
{
|
|
45
|
-
"id": "
|
|
46
|
-
"type": "category"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"id": "f0c83f71-05a6-42da-8911-ae7f45a88aac",
|
|
50
|
-
"type": "page"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"id": "97f8d618-dce3-4d1c-bcf3-75284532d2da",
|
|
51
|
+
"id": "ADD_PAGE_ID_HERE",
|
|
54
52
|
"type": "page"
|
|
55
53
|
}
|
|
56
54
|
],
|
|
@@ -1,125 +1,125 @@
|
|
|
1
|
-
{
|
|
2
|
-
"icon": "https://files.easy-orders.net/1778107568557501919.png",
|
|
3
|
-
"label": "Category mosaic",
|
|
4
|
-
"section_schema": [
|
|
5
|
-
{
|
|
6
|
-
"name": "title",
|
|
7
|
-
"type": "string",
|
|
8
|
-
"default": "Shop by mood",
|
|
9
|
-
"description": "Section heading"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"name": "subtitle",
|
|
13
|
-
"type": "string",
|
|
14
|
-
"default": "Curated drops for work, weekend, and everything between.",
|
|
15
|
-
"description": "Subheading under the title"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "heading_title_color",
|
|
19
|
-
"type": "color",
|
|
20
|
-
"default": "",
|
|
21
|
-
"group": "controls_title",
|
|
22
|
-
"description": "Heading title color (leave empty for default)"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "heading_title_size",
|
|
26
|
-
"type": "number",
|
|
27
|
-
"group": "controls_title",
|
|
28
|
-
"default": 38,
|
|
29
|
-
"description": "Heading title size (px)"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"name": "heading_title_weight",
|
|
33
|
-
"type": "select",
|
|
34
|
-
"default": "500",
|
|
35
|
-
"group": "controls_title",
|
|
36
|
-
"description": "Heading title font weight",
|
|
37
|
-
"options": [
|
|
38
|
-
{ "label": "Regular 400", "value": "400" },
|
|
39
|
-
{ "label": "Medium 500", "value": "500" },
|
|
40
|
-
{ "label": "SemiBold 600", "value": "600" },
|
|
41
|
-
{ "label": "Bold 700", "value": "700" }
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"name": "heading_subtitle_color",
|
|
46
|
-
"type": "color",
|
|
47
|
-
"default": "",
|
|
48
|
-
"group": "controls_subtitle",
|
|
49
|
-
"description": "Subtitle color (leave empty for default)"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"name": "heading_subtitle_size",
|
|
53
|
-
"type": "number",
|
|
54
|
-
"group": "controls_subtitle",
|
|
55
|
-
"default": 16,
|
|
56
|
-
"description": "Subtitle size (px)"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"name": "heading_subtitle_weight",
|
|
60
|
-
"type": "select",
|
|
61
|
-
"default": "400",
|
|
62
|
-
"group": "controls_subtitle",
|
|
63
|
-
"description": "Subtitle font weight",
|
|
64
|
-
"options": [
|
|
65
|
-
{ "label": "Regular 400", "value": "400" },
|
|
66
|
-
{ "label": "Medium 500", "value": "500" },
|
|
67
|
-
{ "label": "SemiBold 600", "value": "600" },
|
|
68
|
-
{ "label": "Bold 700", "value": "700" }
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"name": "section_background",
|
|
73
|
-
"type": "color",
|
|
74
|
-
"default": "",
|
|
75
|
-
"description": "Section background color (leave empty for default white)"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "columns",
|
|
79
|
-
"type": "select",
|
|
80
|
-
"default": "3",
|
|
81
|
-
"description": "Columns on large screens",
|
|
82
|
-
"options": [
|
|
83
|
-
{ "label": "Two columns", "value": "2" },
|
|
84
|
-
{ "label": "Three columns", "value": "3" },
|
|
85
|
-
{ "label": "Four columns", "value": "4" }
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"name": "gap_tight",
|
|
90
|
-
"type": "boolean",
|
|
91
|
-
"default": false,
|
|
92
|
-
"description": "Use tighter spacing between tiles"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"name": "tiles",
|
|
96
|
-
"type": "object_array",
|
|
97
|
-
"description": "Category or collection tiles",
|
|
98
|
-
"fields": [
|
|
99
|
-
{
|
|
100
|
-
"name": "image",
|
|
101
|
-
"type": "image",
|
|
102
|
-
"default": "",
|
|
103
|
-
"description": "صورة القسم"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"name": "label",
|
|
107
|
-
"type": "string",
|
|
108
|
-
"default": "Dresses",
|
|
109
|
-
"description": "اسم القسم على الصورة"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"name": "tagline",
|
|
113
|
-
"type": "string",
|
|
114
|
-
"default": "Fluid lines",
|
|
115
|
-
"description": "وصف قصير تحت الاسم"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"name": "category_id",
|
|
119
|
-
"type": "category_single_select",
|
|
120
|
-
"description": "اختيار القسم (اللينك يتجاب أوتوماتيك)"
|
|
121
|
-
}
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
]
|
|
125
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"icon": "https://files.easy-orders.net/1778107568557501919.png",
|
|
3
|
+
"label": "Category mosaic",
|
|
4
|
+
"section_schema": [
|
|
5
|
+
{
|
|
6
|
+
"name": "title",
|
|
7
|
+
"type": "string",
|
|
8
|
+
"default": "Shop by mood",
|
|
9
|
+
"description": "Section heading"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "subtitle",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"default": "Curated drops for work, weekend, and everything between.",
|
|
15
|
+
"description": "Subheading under the title"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "heading_title_color",
|
|
19
|
+
"type": "color",
|
|
20
|
+
"default": "",
|
|
21
|
+
"group": "controls_title",
|
|
22
|
+
"description": "Heading title color (leave empty for default)"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "heading_title_size",
|
|
26
|
+
"type": "number",
|
|
27
|
+
"group": "controls_title",
|
|
28
|
+
"default": 38,
|
|
29
|
+
"description": "Heading title size (px)"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "heading_title_weight",
|
|
33
|
+
"type": "select",
|
|
34
|
+
"default": "500",
|
|
35
|
+
"group": "controls_title",
|
|
36
|
+
"description": "Heading title font weight",
|
|
37
|
+
"options": [
|
|
38
|
+
{ "label": "Regular 400", "value": "400" },
|
|
39
|
+
{ "label": "Medium 500", "value": "500" },
|
|
40
|
+
{ "label": "SemiBold 600", "value": "600" },
|
|
41
|
+
{ "label": "Bold 700", "value": "700" }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "heading_subtitle_color",
|
|
46
|
+
"type": "color",
|
|
47
|
+
"default": "",
|
|
48
|
+
"group": "controls_subtitle",
|
|
49
|
+
"description": "Subtitle color (leave empty for default)"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "heading_subtitle_size",
|
|
53
|
+
"type": "number",
|
|
54
|
+
"group": "controls_subtitle",
|
|
55
|
+
"default": 16,
|
|
56
|
+
"description": "Subtitle size (px)"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "heading_subtitle_weight",
|
|
60
|
+
"type": "select",
|
|
61
|
+
"default": "400",
|
|
62
|
+
"group": "controls_subtitle",
|
|
63
|
+
"description": "Subtitle font weight",
|
|
64
|
+
"options": [
|
|
65
|
+
{ "label": "Regular 400", "value": "400" },
|
|
66
|
+
{ "label": "Medium 500", "value": "500" },
|
|
67
|
+
{ "label": "SemiBold 600", "value": "600" },
|
|
68
|
+
{ "label": "Bold 700", "value": "700" }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "section_background",
|
|
73
|
+
"type": "color",
|
|
74
|
+
"default": "",
|
|
75
|
+
"description": "Section background color (leave empty for default white)"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "columns",
|
|
79
|
+
"type": "select",
|
|
80
|
+
"default": "3",
|
|
81
|
+
"description": "Columns on large screens",
|
|
82
|
+
"options": [
|
|
83
|
+
{ "label": "Two columns", "value": "2" },
|
|
84
|
+
{ "label": "Three columns", "value": "3" },
|
|
85
|
+
{ "label": "Four columns", "value": "4" }
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "gap_tight",
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"default": false,
|
|
92
|
+
"description": "Use tighter spacing between tiles"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "tiles",
|
|
96
|
+
"type": "object_array",
|
|
97
|
+
"description": "Category or collection tiles",
|
|
98
|
+
"fields": [
|
|
99
|
+
{
|
|
100
|
+
"name": "image",
|
|
101
|
+
"type": "image",
|
|
102
|
+
"default": "",
|
|
103
|
+
"description": "صورة القسم"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "label",
|
|
107
|
+
"type": "string",
|
|
108
|
+
"default": "Dresses",
|
|
109
|
+
"description": "اسم القسم على الصورة"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "tagline",
|
|
113
|
+
"type": "string",
|
|
114
|
+
"default": "Fluid lines",
|
|
115
|
+
"description": "وصف قصير تحت الاسم"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "category_id",
|
|
119
|
+
"type": "category_single_select",
|
|
120
|
+
"description": "اختيار القسم (اللينك يتجاب أوتوماتيك)"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|