@minus-ai/create-skill 0.1.0-beta.10 → 0.1.0-beta.11
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/index.mjs +0 -1
- package/package.json +2 -2
- package/templates/.minus/session-counter +1 -0
- package/templates/README.md.tpl +4 -2
- package/templates/asin/main.tsx.tpl +1 -2
- package/templates/custom/main.tsx.tpl +1 -2
- package/templates/default/main.tsx.tpl +1 -2
- package/templates/file/main.tsx.tpl +1 -2
- package/templates/frontend-package.json.tpl +1 -1
- package/templates/keyword/main.tsx.tpl +1 -2
- package/templates/main.tsx.tpl +1 -2
- package/templates/root-package.json.tpl +3 -1
package/index.mjs
CHANGED
|
@@ -640,7 +640,6 @@ ${templateDocs[inputType] || templateDocs.custom}
|
|
|
640
640
|
writeOut(join(targetDir, 'frontend/tsconfig.json'), render(readTemplate('tsconfig.json.tpl'), vars))
|
|
641
641
|
writeOut(join(targetDir, 'frontend/src/main.tsx'), render(readTemplate('main.tsx.tpl', inputType), vars))
|
|
642
642
|
writeOut(join(targetDir, 'frontend/src/locales/zh-CN.json'), render(readTemplate('zh-CN.json.tpl', inputType), vars))
|
|
643
|
-
writeOut(join(targetDir, 'frontend/src/locales/en-US.json'), render(readTemplate('en-US.json.tpl', inputType), vars))
|
|
644
643
|
|
|
645
644
|
// 类型声明文件(让 tsc build 能识别 @minus/* 模块)
|
|
646
645
|
writeOut(join(targetDir, 'frontend/src/minus-runtime.d.ts'), `declare module '@minus/*';\n`)
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2
|
package/templates/README.md.tpl
CHANGED
|
@@ -107,10 +107,12 @@ pnpm run build
|
|
|
107
107
|
|
|
108
108
|
| 命令 | 说明 |
|
|
109
109
|
|---|---|
|
|
110
|
-
| `pnpm run dev` |
|
|
110
|
+
| `pnpm run dev` | 启动开发环境(mac/Linux,前后端) |
|
|
111
|
+
| `pnpm run dev:backend` | 仅启动后端(mac/Linux) |
|
|
112
|
+
| `pnpm run dev:win` | 启动开发环境(Windows,前后端) |
|
|
113
|
+
| `pnpm run dev:win:backend` | 仅启动后端(Windows) |
|
|
111
114
|
| `pnpm run build` | 构建前端产物 |
|
|
112
115
|
| `cd frontend && pnpm exec vite` | 仅启动前端 |
|
|
113
|
-
| `.venv/bin/uvicorn server:app --port {{port}} --reload --env-file .env.local` | 仅启动后端 |
|
|
114
116
|
|
|
115
117
|
## 进入开发模式(Claude Code)
|
|
116
118
|
|
|
@@ -4,7 +4,6 @@ import { FlowApp, I18nProvider, mergeMessages, useT, type StepConfig } from '@mi
|
|
|
4
4
|
import { AmazonSearchBar, CountrySelect, SearchSubmitButton, validateAsins, platformWidgetMessages } from '@minus/platform-widgets';
|
|
5
5
|
import { Toaster } from 'sonner';
|
|
6
6
|
import zhCN from './locales/zh-CN.json';
|
|
7
|
-
import enUS from './locales/en-US.json';
|
|
8
7
|
|
|
9
8
|
/*
|
|
10
9
|
* 防御性编码提示(适用于所有 step render 函数):
|
|
@@ -71,7 +70,7 @@ function Home({ title, description, useCases, tags, onStart }: { title: string;
|
|
|
71
70
|
const rootEl = document.getElementById('root');
|
|
72
71
|
if (!rootEl) throw new Error('#root not found');
|
|
73
72
|
|
|
74
|
-
const skillMessages = mergeMessages(platformWidgetMessages, { 'zh-CN': zhCN as Record<string, string
|
|
73
|
+
const skillMessages = mergeMessages(platformWidgetMessages, { 'zh-CN': zhCN as Record<string, string> });
|
|
75
74
|
|
|
76
75
|
function SkillRoot() {
|
|
77
76
|
const t = useT();
|
|
@@ -4,7 +4,6 @@ import { FlowApp, I18nProvider, mergeMessages, useT, type StepConfig } from '@mi
|
|
|
4
4
|
import { platformWidgetMessages } from '@minus/platform-widgets';
|
|
5
5
|
import { Toaster } from 'sonner';
|
|
6
6
|
import zhCN from './locales/zh-CN.json';
|
|
7
|
-
import enUS from './locales/en-US.json';
|
|
8
7
|
|
|
9
8
|
/*
|
|
10
9
|
* 防御性编码提示(适用于所有 step render 函数):
|
|
@@ -68,7 +67,7 @@ function Home({ title, description, useCases, tags, onStart }: { title: string;
|
|
|
68
67
|
const rootEl = document.getElementById('root');
|
|
69
68
|
if (!rootEl) throw new Error('#root not found');
|
|
70
69
|
|
|
71
|
-
const skillMessages = mergeMessages(platformWidgetMessages, { 'zh-CN': zhCN as Record<string, string
|
|
70
|
+
const skillMessages = mergeMessages(platformWidgetMessages, { 'zh-CN': zhCN as Record<string, string> });
|
|
72
71
|
|
|
73
72
|
function SkillRoot() {
|
|
74
73
|
const t = useT();
|
|
@@ -4,7 +4,6 @@ import { FlowApp, I18nProvider, mergeMessages, useT, type StepConfig } from '@mi
|
|
|
4
4
|
import { CompletionPanel, platformWidgetMessages } from '@minus/platform-widgets';
|
|
5
5
|
import { Toaster } from 'sonner';
|
|
6
6
|
import zhCN from './locales/zh-CN.json';
|
|
7
|
-
import enUS from './locales/en-US.json';
|
|
8
7
|
|
|
9
8
|
/*
|
|
10
9
|
* 防御性编码提示(适用于所有 step render 函数):
|
|
@@ -61,7 +60,7 @@ if (!rootEl) throw new Error('#root not found');
|
|
|
61
60
|
|
|
62
61
|
const skillMessages = mergeMessages(
|
|
63
62
|
platformWidgetMessages,
|
|
64
|
-
{ 'zh-CN': zhCN as Record<string, string
|
|
63
|
+
{ 'zh-CN': zhCN as Record<string, string> },
|
|
65
64
|
);
|
|
66
65
|
|
|
67
66
|
function SkillRoot() {
|
|
@@ -4,7 +4,6 @@ import { FlowApp, I18nProvider, mergeMessages, useT, type StepConfig } from '@mi
|
|
|
4
4
|
import { FilePicker, uploadFile, platformWidgetMessages } from '@minus/platform-widgets';
|
|
5
5
|
import { Toaster } from 'sonner';
|
|
6
6
|
import zhCN from './locales/zh-CN.json';
|
|
7
|
-
import enUS from './locales/en-US.json';
|
|
8
7
|
|
|
9
8
|
/*
|
|
10
9
|
* 防御性编码提示(适用于所有 step render 函数):
|
|
@@ -79,7 +78,7 @@ function Home({ title, description, useCases, tags, onStart }: { title: string;
|
|
|
79
78
|
const rootEl = document.getElementById('root');
|
|
80
79
|
if (!rootEl) throw new Error('#root not found');
|
|
81
80
|
|
|
82
|
-
const skillMessages = mergeMessages(platformWidgetMessages, { 'zh-CN': zhCN as Record<string, string
|
|
81
|
+
const skillMessages = mergeMessages(platformWidgetMessages, { 'zh-CN': zhCN as Record<string, string> });
|
|
83
82
|
|
|
84
83
|
function SkillRoot() {
|
|
85
84
|
const t = useT();
|
|
@@ -4,7 +4,6 @@ import { FlowApp, I18nProvider, mergeMessages, useT, type StepConfig } from '@mi
|
|
|
4
4
|
import { AmazonSearchBar, CountrySelect, SearchSubmitButton, validateKeywords, platformWidgetMessages } from '@minus/platform-widgets';
|
|
5
5
|
import { Toaster } from 'sonner';
|
|
6
6
|
import zhCN from './locales/zh-CN.json';
|
|
7
|
-
import enUS from './locales/en-US.json';
|
|
8
7
|
|
|
9
8
|
/*
|
|
10
9
|
* 防御性编码提示(适用于所有 step render 函数):
|
|
@@ -71,7 +70,7 @@ function Home({ title, description, useCases, tags, onStart }: { title: string;
|
|
|
71
70
|
const rootEl = document.getElementById('root');
|
|
72
71
|
if (!rootEl) throw new Error('#root not found');
|
|
73
72
|
|
|
74
|
-
const skillMessages = mergeMessages(platformWidgetMessages, { 'zh-CN': zhCN as Record<string, string
|
|
73
|
+
const skillMessages = mergeMessages(platformWidgetMessages, { 'zh-CN': zhCN as Record<string, string> });
|
|
75
74
|
|
|
76
75
|
function SkillRoot() {
|
|
77
76
|
const t = useT();
|
package/templates/main.tsx.tpl
CHANGED
|
@@ -4,7 +4,6 @@ import { FlowApp, I18nProvider, mergeMessages, useT, type StepConfig, type StepR
|
|
|
4
4
|
import { AmazonSearchBar, CompletionPanel, CountrySelect, SearchSubmitButton, validateAsins, validateKeywords, platformWidgetMessages } from '@minus/platform-widgets';
|
|
5
5
|
import { Toaster } from 'sonner';
|
|
6
6
|
import zhCN from './locales/zh-CN.json';
|
|
7
|
-
import enUS from './locales/en-US.json';
|
|
8
7
|
|
|
9
8
|
type InputType = 'keyword' | 'asin';
|
|
10
9
|
|
|
@@ -146,7 +145,7 @@ if (!rootEl) throw new Error('#root not found');
|
|
|
146
145
|
|
|
147
146
|
const skillMessages = mergeMessages(
|
|
148
147
|
platformWidgetMessages,
|
|
149
|
-
{ 'zh-CN': zhCN as Record<string, string
|
|
148
|
+
{ 'zh-CN': zhCN as Record<string, string> },
|
|
150
149
|
);
|
|
151
150
|
|
|
152
151
|
function SkillRoot() {
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"dev": "minus-dev-cleanup && mkdir -p .minus && echo $$ > .minus/dev.pid && concurrently -n skill,fe \".venv/bin/uvicorn server:app --port {{port}} --reload --reload-include '*.py' --reload-include '.env.local' --env-file .env.local\" \"cd frontend && pnpm exec vite\"",
|
|
16
16
|
"dev:backend": "minus-dev-cleanup && mkdir -p .minus && echo $$ > .minus/backend.pid && .venv/bin/uvicorn server:app --port {{port}} --reload --reload-include '*.py' --reload-include '.env.local' --env-file .env.local",
|
|
17
|
+
"dev:win": "minus-dev --port {{port}}",
|
|
18
|
+
"dev:win:backend": "minus-dev --port {{port}} --backend-only",
|
|
17
19
|
"build": "cd frontend && pnpm run build"
|
|
18
20
|
},
|
|
19
21
|
"devDependencies": {
|
|
20
|
-
"@minus-ai/dev-vite-plugin": "^0.1.0-beta.
|
|
22
|
+
"@minus-ai/dev-vite-plugin": "^0.1.0-beta.12",
|
|
21
23
|
"concurrently": "^9.1.2"
|
|
22
24
|
}
|
|
23
25
|
}
|