@youcan/theme 2.4.3 → 2.5.1
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.
|
@@ -117,6 +117,12 @@ async function prompt(command) {
|
|
|
117
117
|
message: 'A documentation URL for this theme.',
|
|
118
118
|
initial: 'https://developer.youcan.shop',
|
|
119
119
|
},
|
|
120
|
+
{
|
|
121
|
+
type: 'text',
|
|
122
|
+
name: 'theme_tutorial_url',
|
|
123
|
+
message: 'A video tutorial URL for this theme.',
|
|
124
|
+
initial: 'https://www.youtube.com/@Youcandotshop',
|
|
125
|
+
},
|
|
120
126
|
]);
|
|
121
127
|
}
|
|
122
128
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { THEME_FILE_TYPES } from '../../../constants.js';
|
|
2
|
-
import { Worker,
|
|
2
|
+
import { Worker, System, Path, Filesystem } from '@youcan/cli-kit';
|
|
3
3
|
import debounce from 'debounce';
|
|
4
4
|
import { Server } from 'socket.io';
|
|
5
5
|
import { execute } from './execute.js';
|
|
@@ -24,14 +24,14 @@ class ThemeWorker extends Worker.Abstract {
|
|
|
24
24
|
try {
|
|
25
25
|
this.io = new Server(7565, {
|
|
26
26
|
cors: {
|
|
27
|
-
origin:
|
|
27
|
+
origin: `https://${this.store.domain}`,
|
|
28
28
|
methods: ['GET', 'POST'],
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
this.io.on('connection', (socket) => {
|
|
32
32
|
this.previewLogger.write(`attached to preview page at ${socket.handshake.address}`);
|
|
33
33
|
});
|
|
34
|
-
System.open(
|
|
34
|
+
System.open(`https://${this.store.domain}/themes/${this.theme.theme_id}/preview`);
|
|
35
35
|
}
|
|
36
36
|
catch (err) {
|
|
37
37
|
this.command.error(err);
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youcan/theme",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.1",
|
|
5
5
|
"description": "OCLIF plugin for building themes",
|
|
6
6
|
"author": "YouCan <contact@youcan.shop> (https://youcan.shop)",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/youcan-shop/cli"
|
|
11
|
+
},
|
|
8
12
|
"keywords": [
|
|
9
13
|
"youcan",
|
|
10
14
|
"youcan-cli",
|
|
@@ -18,7 +22,7 @@
|
|
|
18
22
|
"@oclif/core": "^2.15.0",
|
|
19
23
|
"debounce": "^2.0.0",
|
|
20
24
|
"socket.io": "^4.7.2",
|
|
21
|
-
"@youcan/cli-kit": "2.
|
|
25
|
+
"@youcan/cli-kit": "2.5.1"
|
|
22
26
|
},
|
|
23
27
|
"devDependencies": {
|
|
24
28
|
"@oclif/plugin-legacy": "^1.3.0",
|