优化
This commit is contained in:
9
apps/cli/templates/client-plugin/{{id}}/manifest.json
Normal file
9
apps/cli/templates/client-plugin/{{id}}/manifest.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"label": "{{name}}",
|
||||
"name": "{{id}}",
|
||||
"url": "/plugins/{{id}}/index.js",
|
||||
"version": "0.0.0",
|
||||
"author": "{{author}}",
|
||||
"description": "{{desc}}",
|
||||
"requireRestart": true
|
||||
}
|
||||
16
apps/cli/templates/client-plugin/{{id}}/package.json
Normal file
16
apps/cli/templates/client-plugin/{{id}}/package.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "@plugins/{{id}}",
|
||||
"main": "src/index.tsx",
|
||||
"version": "0.0.0",
|
||||
"description": "{{desc}}",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"sync:declaration": "tailchat declaration github"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@types/styled-components": "^5.1.26",
|
||||
"react": "18.2.0",
|
||||
"styled-components": "^5.3.6"
|
||||
}
|
||||
}
|
||||
4
apps/cli/templates/client-plugin/{{id}}/src/index.tsx
Normal file
4
apps/cli/templates/client-plugin/{{id}}/src/index.tsx
Normal file
@@ -0,0 +1,4 @@
|
||||
const PLUGIN_ID = '{{id}}';
|
||||
const PLUGIN_NAME = '{{name}}';
|
||||
|
||||
console.log(`Plugin ${PLUGIN_NAME}(${PLUGIN_ID}) is loaded`);
|
||||
8
apps/cli/templates/client-plugin/{{id}}/src/translate.ts
Normal file
8
apps/cli/templates/client-plugin/{{id}}/src/translate.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { localTrans } from '@capital/common';
|
||||
|
||||
export const Translate = {
|
||||
name: localTrans({
|
||||
'zh-CN': '{{name}}',
|
||||
'en-US': '{{name}}',
|
||||
}),
|
||||
};
|
||||
7
apps/cli/templates/client-plugin/{{id}}/tsconfig.json
Normal file
7
apps/cli/templates/client-plugin/{{id}}/tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
"jsx": "react",
|
||||
"importsNotUsedAsValues": "error"
|
||||
}
|
||||
}
|
||||
2
apps/cli/templates/client-plugin/{{id}}/types/tailchat.d.ts
vendored
Normal file
2
apps/cli/templates/client-plugin/{{id}}/types/tailchat.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
declare module '@capital/common';
|
||||
declare module '@capital/component';
|
||||
Reference in New Issue
Block a user