@youcan/theme 2.3.1 → 2.3.3
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/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +5 -5
- package/dist/cli/commands/theme/init.js +3 -3
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/pack.js +1 -1
- package/dist/cli/services/dev/execute.d.ts +2 -2
- package/dist/cli/services/dev/worker.d.ts +2 -2
- package/dist/cli/services/dev/worker.js +4 -4
- package/dist/util/theme-command.js +1 -1
- package/dist/util/theme-loader.js +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Session, Http, Env, Tasks } from '@youcan/cli-kit';
|
|
2
1
|
import { ThemeCommand } from '../../../util/theme-command.js';
|
|
2
|
+
import { Session, Http, Env, Tasks } from '@youcan/cli-kit';
|
|
3
3
|
|
|
4
4
|
class Delete extends ThemeCommand {
|
|
5
5
|
static description = 'Select remote development themes to delete';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Session, Tasks, Http, Env, Path, Filesystem, Crypto, UI } from '@youcan/cli-kit';
|
|
2
|
-
import { ThemeCommand } from '../../../util/theme-command.js';
|
|
3
|
-
import { load } from '../../../util/theme-loader.js';
|
|
4
|
-
import ThemeWorker from '../../services/dev/worker.js';
|
|
5
1
|
import { execute } from '../../services/dev/execute.js';
|
|
2
|
+
import ThemeWorker from '../../services/dev/worker.js';
|
|
6
3
|
import { THEME_FILE_TYPES } from '../../../constants.js';
|
|
4
|
+
import { ThemeCommand } from '../../../util/theme-command.js';
|
|
5
|
+
import { load } from '../../../util/theme-loader.js';
|
|
6
|
+
import { Session, Tasks, Http, Env, Path, Filesystem, Crypto, UI } from '@youcan/cli-kit';
|
|
7
7
|
|
|
8
8
|
class Dev extends ThemeCommand {
|
|
9
9
|
static description = 'Start a theme development server and preview your changes';
|
|
@@ -25,7 +25,7 @@ class Dev extends ThemeCommand {
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
title: 'Syncing theme files, please wait...',
|
|
28
|
-
async task(
|
|
28
|
+
async task() {
|
|
29
29
|
for (const type of THEME_FILE_TYPES) {
|
|
30
30
|
const descriptors = theme.metadata[type] ?? [];
|
|
31
31
|
const directory = Path.resolve(theme.root, type);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { THEME_CONFIG_FILENAME } from '../../../constants.js';
|
|
2
|
+
import { THEME_FLAGS } from '../../../flags.js';
|
|
3
|
+
import { ThemeCommand } from '../../../util/theme-command.js';
|
|
1
4
|
import { Args, Flags } from '@oclif/core';
|
|
2
5
|
import { Cli, Session, Path, Tasks, Git, Filesystem, Form, Http, Env } from '@youcan/cli-kit';
|
|
3
|
-
import { ThemeCommand } from '../../../util/theme-command.js';
|
|
4
|
-
import { THEME_FLAGS } from '../../../flags.js';
|
|
5
|
-
import { THEME_CONFIG_FILENAME } from '../../../constants.js';
|
|
6
6
|
|
|
7
7
|
class Init extends ThemeCommand {
|
|
8
8
|
static description = 'Clones a theme template git repo';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Session, Tasks, Path, Filesystem } from '@youcan/cli-kit';
|
|
2
1
|
import { ThemeCommand } from '../../../util/theme-command.js';
|
|
3
2
|
import { load } from '../../../util/theme-loader.js';
|
|
3
|
+
import { Session, Tasks, Path, Filesystem } from '@youcan/cli-kit';
|
|
4
4
|
|
|
5
5
|
const formatter = Intl.NumberFormat('en', {
|
|
6
6
|
notation: 'compact',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Worker } from '@youcan/cli-kit';
|
|
2
|
-
import type { Theme } from '@/types';
|
|
3
1
|
import type { THEME_FILE_TYPES } from '@/constants';
|
|
2
|
+
import type { Theme } from '@/types';
|
|
3
|
+
import type { Worker } from '@youcan/cli-kit';
|
|
4
4
|
export declare function execute(theme: Theme, op: 'save' | 'delete', type: typeof THEME_FILE_TYPES[number], name: string, logger?: Worker.Logger | null): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Worker } from '@youcan/cli-kit';
|
|
2
|
-
import type { ThemeCommand } from '@/util/theme-command';
|
|
3
1
|
import type { Store, Theme } from '@/types';
|
|
2
|
+
import type { ThemeCommand } from '@/util/theme-command';
|
|
3
|
+
import { Worker } from '@youcan/cli-kit';
|
|
4
4
|
export default class ThemeWorker extends Worker.Abstract {
|
|
5
5
|
private command;
|
|
6
6
|
private store;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { THEME_FILE_TYPES } from '../../../constants.js';
|
|
1
2
|
import { Worker, Http, System, Path, Filesystem } from '@youcan/cli-kit';
|
|
2
|
-
import { Server } from 'socket.io';
|
|
3
3
|
import debounce from 'debounce';
|
|
4
|
+
import { Server } from 'socket.io';
|
|
4
5
|
import { execute } from './execute.js';
|
|
5
|
-
import { THEME_FILE_TYPES } from '../../../constants.js';
|
|
6
6
|
|
|
7
7
|
class ThemeWorker extends Worker.Abstract {
|
|
8
8
|
command;
|
|
@@ -78,14 +78,14 @@ class ThemeWorker extends Worker.Abstract {
|
|
|
78
78
|
}
|
|
79
79
|
enqueue(op, type, name) {
|
|
80
80
|
this.queue.push(async () => {
|
|
81
|
-
await this.execute(op, type, name
|
|
81
|
+
await this.execute(op, type, name);
|
|
82
82
|
debounce(() => {
|
|
83
83
|
this.io.emit('theme:update');
|
|
84
84
|
this.previewLogger.write('reloading preview...');
|
|
85
85
|
}, 100)();
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
async execute(op, type, name
|
|
88
|
+
async execute(op, type, name) {
|
|
89
89
|
return execute(this.theme, op, type, name, this.logger);
|
|
90
90
|
}
|
|
91
91
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youcan/theme",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.3",
|
|
5
5
|
"description": "OCLIF plugin for building themes",
|
|
6
6
|
"author": "YouCan <contact@youcan.shop> (https://youcan.shop)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@oclif/core": "^2.15.0",
|
|
19
19
|
"debounce": "^2.0.0",
|
|
20
20
|
"socket.io": "^4.7.2",
|
|
21
|
-
"@youcan/cli-kit": "2.3.
|
|
21
|
+
"@youcan/cli-kit": "2.3.3"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@oclif/plugin-legacy": "^1.3.0",
|