@oinone/cli 7.2.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.
- package/README.md +115 -0
- package/README_zh-CN.md +115 -0
- package/bin/cli.js +429 -0
- package/package.json +25 -0
- package/template-6.4.0-community/.eslintignore +5 -0
- package/template-6.4.0-community/.eslintrc.json +72 -0
- package/template-6.4.0-community/.prettierrc.json +8 -0
- package/template-6.4.0-community/README.md +59 -0
- package/template-6.4.0-community/_package.json +47 -0
- package/template-6.4.0-community/gitignore +58 -0
- package/template-6.4.0-community/lerna.json +12 -0
- package/template-6.4.0-community/npmrc +3 -0
- package/template-6.4.0-community/packages/ss-admin-widget/index.ts +1 -0
- package/template-6.4.0-community/packages/ss-admin-widget/package.json +25 -0
- package/template-6.4.0-community/packages/ss-admin-widget/rollup.config.js +73 -0
- package/template-6.4.0-community/packages/ss-admin-widget/scripts/postpublish.js +13 -0
- package/template-6.4.0-community/packages/ss-admin-widget/scripts/prepublish-only.js +24 -0
- package/template-6.4.0-community/packages/ss-admin-widget/src/index.ts +1 -0
- package/template-6.4.0-community/packages/ss-admin-widget/src/shim-translate.d.ts +10 -0
- package/template-6.4.0-community/packages/ss-admin-widget/src/shim-vue.d.ts +6 -0
- package/template-6.4.0-community/packages/ss-admin-widget/tsconfig.json +45 -0
- package/template-6.4.0-community/packages/ss-boot/.env +1 -0
- package/template-6.4.0-community/packages/ss-boot/.env.example +6 -0
- package/template-6.4.0-community/packages/ss-boot/package.json +53 -0
- package/template-6.4.0-community/packages/ss-boot/public/favicon.ico +0 -0
- package/template-6.4.0-community/packages/ss-boot/public/index.html +83 -0
- package/template-6.4.0-community/packages/ss-boot/public/manifest.js +5 -0
- package/template-6.4.0-community/packages/ss-boot/src/main.ts +50 -0
- package/template-6.4.0-community/packages/ss-boot/src/shim-translate.d.ts +10 -0
- package/template-6.4.0-community/packages/ss-boot/src/shim-vue.d.ts +6 -0
- package/template-6.4.0-community/packages/ss-boot/tsconfig.json +44 -0
- package/template-6.4.0-community/packages/ss-boot/vue.config.js +84 -0
- package/template-6.4.0-community/packages/ss-oinone/index.ts +1 -0
- package/template-6.4.0-community/packages/ss-oinone/package.json +29 -0
- package/template-6.4.0-community/packages/ss-oinone/rollup.config.js +82 -0
- package/template-6.4.0-community/packages/ss-oinone/scripts/postpublish.js +13 -0
- package/template-6.4.0-community/packages/ss-oinone/scripts/prepublish-only.js +24 -0
- package/template-6.4.0-community/packages/ss-oinone/src/index.ts +1 -0
- package/template-6.4.0-community/packages/ss-oinone/src/shim-translate.d.ts +10 -0
- package/template-6.4.0-community/packages/ss-oinone/src/shim-vue.d.ts +6 -0
- package/template-6.4.0-community/packages/ss-oinone/tsconfig.json +42 -0
- package/template-6.4.0-community/packages/ss-project/index.ts +1 -0
- package/template-6.4.0-community/packages/ss-project/package.json +30 -0
- package/template-6.4.0-community/packages/ss-project/rollup.config.js +83 -0
- package/template-6.4.0-community/packages/ss-project/scripts/postpublish.js +13 -0
- package/template-6.4.0-community/packages/ss-project/scripts/prepublish-only.js +24 -0
- package/template-6.4.0-community/packages/ss-project/src/index.ts +1 -0
- package/template-6.4.0-community/packages/ss-project/src/shim-translate.d.ts +10 -0
- package/template-6.4.0-community/packages/ss-project/src/shim-vue.d.ts +6 -0
- package/template-6.4.0-community/packages/ss-project/tsconfig.json +42 -0
- package/template-6.4.0-community/pnpm-workspace.yaml +3 -0
- package/template-6.4.0-community/scripts/build/inset-tsconfig.js +68 -0
- package/template-6.4.0-community/scripts/build/package-name.js +25 -0
- package/template-6.4.0-community/scripts/build/postbuild.js +42 -0
- package/template-6.4.0-community/scripts/build/prebuild-only.js +48 -0
- package/template-6.4.0-community/scripts/clean.mjs +22 -0
- package/template-6.4.0-enterprise/.eslintignore +5 -0
- package/template-6.4.0-enterprise/.eslintrc.json +72 -0
- package/template-6.4.0-enterprise/.prettierrc.json +8 -0
- package/template-6.4.0-enterprise/README.md +59 -0
- package/template-6.4.0-enterprise/_package.json +47 -0
- package/template-6.4.0-enterprise/gitignore +58 -0
- package/template-6.4.0-enterprise/lerna.json +12 -0
- package/template-6.4.0-enterprise/npmrc +3 -0
- package/template-6.4.0-enterprise/packages/ss-admin-widget/index.ts +1 -0
- package/template-6.4.0-enterprise/packages/ss-admin-widget/package.json +25 -0
- package/template-6.4.0-enterprise/packages/ss-admin-widget/rollup.config.js +73 -0
- package/template-6.4.0-enterprise/packages/ss-admin-widget/scripts/postpublish.js +13 -0
- package/template-6.4.0-enterprise/packages/ss-admin-widget/scripts/prepublish-only.js +24 -0
- package/template-6.4.0-enterprise/packages/ss-admin-widget/src/index.ts +1 -0
- package/template-6.4.0-enterprise/packages/ss-admin-widget/src/shim-translate.d.ts +10 -0
- package/template-6.4.0-enterprise/packages/ss-admin-widget/src/shim-vue.d.ts +6 -0
- package/template-6.4.0-enterprise/packages/ss-admin-widget/tsconfig.json +45 -0
- package/template-6.4.0-enterprise/packages/ss-boot/.env +1 -0
- package/template-6.4.0-enterprise/packages/ss-boot/.env.example +6 -0
- package/template-6.4.0-enterprise/packages/ss-boot/package.json +66 -0
- package/template-6.4.0-enterprise/packages/ss-boot/public/favicon.ico +0 -0
- package/template-6.4.0-enterprise/packages/ss-boot/public/index.html +83 -0
- package/template-6.4.0-enterprise/packages/ss-boot/public/manifest.js +5 -0
- package/template-6.4.0-enterprise/packages/ss-boot/src/main.ts +69 -0
- package/template-6.4.0-enterprise/packages/ss-boot/src/shim-translate.d.ts +10 -0
- package/template-6.4.0-enterprise/packages/ss-boot/src/shim-vue.d.ts +6 -0
- package/template-6.4.0-enterprise/packages/ss-boot/tsconfig.json +44 -0
- package/template-6.4.0-enterprise/packages/ss-boot/vue.config.js +84 -0
- package/template-6.4.0-enterprise/packages/ss-oinone/index.ts +1 -0
- package/template-6.4.0-enterprise/packages/ss-oinone/package.json +29 -0
- package/template-6.4.0-enterprise/packages/ss-oinone/rollup.config.js +82 -0
- package/template-6.4.0-enterprise/packages/ss-oinone/scripts/postpublish.js +13 -0
- package/template-6.4.0-enterprise/packages/ss-oinone/scripts/prepublish-only.js +24 -0
- package/template-6.4.0-enterprise/packages/ss-oinone/src/index.ts +1 -0
- package/template-6.4.0-enterprise/packages/ss-oinone/src/shim-translate.d.ts +10 -0
- package/template-6.4.0-enterprise/packages/ss-oinone/src/shim-vue.d.ts +6 -0
- package/template-6.4.0-enterprise/packages/ss-oinone/tsconfig.json +42 -0
- package/template-6.4.0-enterprise/packages/ss-project/index.ts +1 -0
- package/template-6.4.0-enterprise/packages/ss-project/package.json +30 -0
- package/template-6.4.0-enterprise/packages/ss-project/rollup.config.js +83 -0
- package/template-6.4.0-enterprise/packages/ss-project/scripts/postpublish.js +13 -0
- package/template-6.4.0-enterprise/packages/ss-project/scripts/prepublish-only.js +24 -0
- package/template-6.4.0-enterprise/packages/ss-project/src/index.ts +1 -0
- package/template-6.4.0-enterprise/packages/ss-project/src/shim-translate.d.ts +10 -0
- package/template-6.4.0-enterprise/packages/ss-project/src/shim-vue.d.ts +6 -0
- package/template-6.4.0-enterprise/packages/ss-project/tsconfig.json +42 -0
- package/template-6.4.0-enterprise/pnpm-workspace.yaml +3 -0
- package/template-6.4.0-enterprise/scripts/build/inset-tsconfig.js +68 -0
- package/template-6.4.0-enterprise/scripts/build/package-name.js +25 -0
- package/template-6.4.0-enterprise/scripts/build/postbuild.js +42 -0
- package/template-6.4.0-enterprise/scripts/build/prebuild-only.js +48 -0
- package/template-6.4.0-enterprise/scripts/clean.mjs +22 -0
- package/template-7.2.0-community/.prettierrc.json +8 -0
- package/template-7.2.0-community/README.md +59 -0
- package/template-7.2.0-community/_package.json +57 -0
- package/template-7.2.0-community/eslint.config.ts +23 -0
- package/template-7.2.0-community/gitignore +58 -0
- package/template-7.2.0-community/lerna.json +12 -0
- package/template-7.2.0-community/npmrc +3 -0
- package/template-7.2.0-community/packages/ss-admin-widget/index.ts +1 -0
- package/template-7.2.0-community/packages/ss-admin-widget/package.json +27 -0
- package/template-7.2.0-community/packages/ss-admin-widget/rollup.config.js +12 -0
- package/template-7.2.0-community/packages/ss-admin-widget/scripts/postpublish.js +13 -0
- package/template-7.2.0-community/packages/ss-admin-widget/scripts/prepublish-only.js +24 -0
- package/template-7.2.0-community/packages/ss-admin-widget/src/index.ts +1 -0
- package/template-7.2.0-community/packages/ss-admin-widget/src/shim-translate.d.ts +10 -0
- package/template-7.2.0-community/packages/ss-admin-widget/src/shim-vue.d.ts +6 -0
- package/template-7.2.0-community/packages/ss-admin-widget/tsconfig.json +14 -0
- package/template-7.2.0-community/packages/ss-boot/.env +1 -0
- package/template-7.2.0-community/packages/ss-boot/.env.example +6 -0
- package/template-7.2.0-community/packages/ss-boot/package.json +51 -0
- package/template-7.2.0-community/packages/ss-boot/public/favicon.ico +0 -0
- package/template-7.2.0-community/packages/ss-boot/public/index.html +83 -0
- package/template-7.2.0-community/packages/ss-boot/public/manifest.js +5 -0
- package/template-7.2.0-community/packages/ss-boot/src/main.ts +46 -0
- package/template-7.2.0-community/packages/ss-boot/src/shim-translate.d.ts +10 -0
- package/template-7.2.0-community/packages/ss-boot/src/shim-vue.d.ts +6 -0
- package/template-7.2.0-community/packages/ss-boot/tsconfig.json +27 -0
- package/template-7.2.0-community/packages/ss-boot/vue.config.js +87 -0
- package/template-7.2.0-community/packages/ss-oinone/index.ts +1 -0
- package/template-7.2.0-community/packages/ss-oinone/package.json +30 -0
- package/template-7.2.0-community/packages/ss-oinone/rollup.config.js +12 -0
- package/template-7.2.0-community/packages/ss-oinone/scripts/postpublish.js +13 -0
- package/template-7.2.0-community/packages/ss-oinone/scripts/prepublish-only.js +24 -0
- package/template-7.2.0-community/packages/ss-oinone/src/index.ts +1 -0
- package/template-7.2.0-community/packages/ss-oinone/src/shim-translate.d.ts +10 -0
- package/template-7.2.0-community/packages/ss-oinone/src/shim-vue.d.ts +6 -0
- package/template-7.2.0-community/packages/ss-oinone/tsconfig.json +14 -0
- package/template-7.2.0-community/packages/ss-project/index.ts +1 -0
- package/template-7.2.0-community/packages/ss-project/package.json +30 -0
- package/template-7.2.0-community/packages/ss-project/rollup.config.js +12 -0
- package/template-7.2.0-community/packages/ss-project/scripts/postpublish.js +13 -0
- package/template-7.2.0-community/packages/ss-project/scripts/prepublish-only.js +24 -0
- package/template-7.2.0-community/packages/ss-project/src/index.ts +1 -0
- package/template-7.2.0-community/packages/ss-project/src/shim-translate.d.ts +10 -0
- package/template-7.2.0-community/packages/ss-project/src/shim-vue.d.ts +6 -0
- package/template-7.2.0-community/packages/ss-project/tsconfig.json +14 -0
- package/template-7.2.0-community/pnpm-workspace.yaml +3 -0
- package/template-7.2.0-community/scripts/build/inset-tsconfig.js +68 -0
- package/template-7.2.0-community/scripts/build/package-name.js +25 -0
- package/template-7.2.0-community/scripts/clean.mjs +22 -0
- package/template-7.2.0-enterprise/.prettierrc.json +8 -0
- package/template-7.2.0-enterprise/README.md +59 -0
- package/template-7.2.0-enterprise/_package.json +57 -0
- package/template-7.2.0-enterprise/eslint.config.ts +23 -0
- package/template-7.2.0-enterprise/gitignore +58 -0
- package/template-7.2.0-enterprise/lerna.json +12 -0
- package/template-7.2.0-enterprise/npmrc +3 -0
- package/template-7.2.0-enterprise/packages/ss-admin-widget/index.ts +1 -0
- package/template-7.2.0-enterprise/packages/ss-admin-widget/package.json +27 -0
- package/template-7.2.0-enterprise/packages/ss-admin-widget/rollup.config.js +12 -0
- package/template-7.2.0-enterprise/packages/ss-admin-widget/scripts/postpublish.js +13 -0
- package/template-7.2.0-enterprise/packages/ss-admin-widget/scripts/prepublish-only.js +24 -0
- package/template-7.2.0-enterprise/packages/ss-admin-widget/src/index.ts +1 -0
- package/template-7.2.0-enterprise/packages/ss-admin-widget/src/shim-translate.d.ts +10 -0
- package/template-7.2.0-enterprise/packages/ss-admin-widget/src/shim-vue.d.ts +6 -0
- package/template-7.2.0-enterprise/packages/ss-admin-widget/tsconfig.json +14 -0
- package/template-7.2.0-enterprise/packages/ss-boot/.env +1 -0
- package/template-7.2.0-enterprise/packages/ss-boot/.env.example +6 -0
- package/template-7.2.0-enterprise/packages/ss-boot/package.json +64 -0
- package/template-7.2.0-enterprise/packages/ss-boot/public/favicon.ico +0 -0
- package/template-7.2.0-enterprise/packages/ss-boot/public/index.html +83 -0
- package/template-7.2.0-enterprise/packages/ss-boot/public/manifest.js +5 -0
- package/template-7.2.0-enterprise/packages/ss-boot/src/main.ts +66 -0
- package/template-7.2.0-enterprise/packages/ss-boot/src/shim-translate.d.ts +10 -0
- package/template-7.2.0-enterprise/packages/ss-boot/src/shim-vue.d.ts +6 -0
- package/template-7.2.0-enterprise/packages/ss-boot/tsconfig.json +27 -0
- package/template-7.2.0-enterprise/packages/ss-boot/vue.config.js +87 -0
- package/template-7.2.0-enterprise/packages/ss-oinone/index.ts +1 -0
- package/template-7.2.0-enterprise/packages/ss-oinone/package.json +30 -0
- package/template-7.2.0-enterprise/packages/ss-oinone/rollup.config.js +12 -0
- package/template-7.2.0-enterprise/packages/ss-oinone/scripts/postpublish.js +13 -0
- package/template-7.2.0-enterprise/packages/ss-oinone/scripts/prepublish-only.js +24 -0
- package/template-7.2.0-enterprise/packages/ss-oinone/src/index.ts +1 -0
- package/template-7.2.0-enterprise/packages/ss-oinone/src/shim-translate.d.ts +10 -0
- package/template-7.2.0-enterprise/packages/ss-oinone/src/shim-vue.d.ts +6 -0
- package/template-7.2.0-enterprise/packages/ss-oinone/tsconfig.json +14 -0
- package/template-7.2.0-enterprise/packages/ss-project/index.ts +1 -0
- package/template-7.2.0-enterprise/packages/ss-project/package.json +30 -0
- package/template-7.2.0-enterprise/packages/ss-project/rollup.config.js +12 -0
- package/template-7.2.0-enterprise/packages/ss-project/scripts/postpublish.js +13 -0
- package/template-7.2.0-enterprise/packages/ss-project/scripts/prepublish-only.js +24 -0
- package/template-7.2.0-enterprise/packages/ss-project/src/index.ts +1 -0
- package/template-7.2.0-enterprise/packages/ss-project/src/shim-translate.d.ts +10 -0
- package/template-7.2.0-enterprise/packages/ss-project/src/shim-vue.d.ts +6 -0
- package/template-7.2.0-enterprise/packages/ss-project/tsconfig.json +14 -0
- package/template-7.2.0-enterprise/pnpm-workspace.yaml +3 -0
- package/template-7.2.0-enterprise/scripts/build/inset-tsconfig.js +68 -0
- package/template-7.2.0-enterprise/scripts/build/package-name.js +25 -0
- package/template-7.2.0-enterprise/scripts/clean.mjs +22 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* eslint-disable import/no-dynamic-require */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const url = path.resolve(process.cwd(), 'package.json');
|
|
6
|
+
const packageJSON = require(url);
|
|
7
|
+
|
|
8
|
+
const libName = packageJSON.name.replace('@', '').replace('/', '-');
|
|
9
|
+
|
|
10
|
+
packageJSON.main = `dist/${libName}.esm.js`;
|
|
11
|
+
packageJSON.module = `dist/${libName}.esm.js`;
|
|
12
|
+
const typings = 'dist/types/index.d.ts';
|
|
13
|
+
packageJSON.typings = typings;
|
|
14
|
+
|
|
15
|
+
const typingsUrl = path.resolve(process.cwd(), typings);
|
|
16
|
+
const dir = fs.existsSync(typingsUrl);
|
|
17
|
+
|
|
18
|
+
if (!dir) {
|
|
19
|
+
packageJSON.typings = 'dist/index.d.ts';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
packageJSON.files = ['dist'];
|
|
23
|
+
|
|
24
|
+
fs.writeFileSync('package.json', JSON.stringify(packageJSON, null, 2));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const fs = require('fs').promises;
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const packageNames = ['@oinone/kunlun-vue-admin-base'];
|
|
4
|
+
|
|
5
|
+
const content = `{
|
|
6
|
+
"compilerOptions": {
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"emitDecoratorMetadata": true,
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"target": "ES6",
|
|
11
|
+
"module": "esnext",
|
|
12
|
+
"strict": true,
|
|
13
|
+
"importHelpers": true,
|
|
14
|
+
"moduleResolution": "node",
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"allowSyntheticDefaultImports": true,
|
|
17
|
+
"sourceMap": true,
|
|
18
|
+
"skipLibCheck": true,
|
|
19
|
+
"declaration": true,
|
|
20
|
+
"baseUrl": ".",
|
|
21
|
+
"lib": [
|
|
22
|
+
"ES2018",
|
|
23
|
+
"esnext",
|
|
24
|
+
"dom",
|
|
25
|
+
"dom.iterable",
|
|
26
|
+
"scripthost"
|
|
27
|
+
],
|
|
28
|
+
"types": [
|
|
29
|
+
"node",
|
|
30
|
+
"reflect-metadata",
|
|
31
|
+
"jest"
|
|
32
|
+
],
|
|
33
|
+
"typeRoots": [
|
|
34
|
+
"node_modules/@types"
|
|
35
|
+
],
|
|
36
|
+
"declarationDir": "dist/types",
|
|
37
|
+
"outDir": "dist",
|
|
38
|
+
"noImplicitAny": false,
|
|
39
|
+
"incremental": true,
|
|
40
|
+
"resolveJsonModule": true
|
|
41
|
+
},
|
|
42
|
+
"include": [
|
|
43
|
+
"packages"
|
|
44
|
+
],
|
|
45
|
+
"exclude": [
|
|
46
|
+
"node_modules",
|
|
47
|
+
"dist"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
async function insetTSConfig() {
|
|
53
|
+
const oinoneCwd = path.resolve(process.cwd(), '../../node_modules');
|
|
54
|
+
|
|
55
|
+
for (const packageName of packageNames) {
|
|
56
|
+
const dependenciesPath = path.resolve(oinoneCwd, packageName);
|
|
57
|
+
try {
|
|
58
|
+
await fs.access(dependenciesPath);
|
|
59
|
+
} catch (err) {
|
|
60
|
+
console.error(`动态插入tsconfig失败: ${dependenciesPath}`, err);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
await fs.writeFile(path.resolve(dependenciesPath, 'tsconfig.json'), content);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
module.exports = { insetTSConfig };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const packageNames = [
|
|
2
|
+
'@oinone/kunlun-cache',
|
|
3
|
+
'@oinone/kunlun-dsl',
|
|
4
|
+
'@oinone/kunlun-environment',
|
|
5
|
+
'@oinone/kunlun-event',
|
|
6
|
+
'@oinone/kunlun-expression',
|
|
7
|
+
'@oinone/kunlun-meta',
|
|
8
|
+
'@oinone/kunlun-shared',
|
|
9
|
+
'@oinone/kunlun-request',
|
|
10
|
+
'@oinone/kunlun-router',
|
|
11
|
+
'@oinone/kunlun-service',
|
|
12
|
+
'@oinone/kunlun-spi',
|
|
13
|
+
'@oinone/kunlun-state',
|
|
14
|
+
'@oinone/kunlun-theme',
|
|
15
|
+
'@oinone/kunlun-engine',
|
|
16
|
+
'@oinone/kunlun-vue-router',
|
|
17
|
+
'@oinone/kunlun-vue-ui',
|
|
18
|
+
'@oinone/kunlun-vue-ui-antd',
|
|
19
|
+
'@oinone/kunlun-vue-ui-common',
|
|
20
|
+
'@oinone/kunlun-vue-admin-base',
|
|
21
|
+
'@oinone/kunlun-vue-ui-el',
|
|
22
|
+
'@oinone/kunlun-vue-widget'
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
module.exports = { packageNames };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { rimraf } from 'rimraf';
|
|
2
|
+
import { globSync } from 'glob';
|
|
3
|
+
|
|
4
|
+
// 匹配所有 node_modules 文件夹
|
|
5
|
+
const files = globSync('packages/**/node_modules')
|
|
6
|
+
|
|
7
|
+
// 删除所有匹配的 node_modules
|
|
8
|
+
files.forEach((file) => {
|
|
9
|
+
rimraf(file).then((deleted) => {
|
|
10
|
+
if (!deleted) console.error(`Error deleting ${file}:`, err);
|
|
11
|
+
else console.log(`Deleted ${file}`);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// 删除其他文件
|
|
16
|
+
const filesToDelete = ['package-lock.json', 'pnpm-lock.yaml', 'node_modules'];
|
|
17
|
+
filesToDelete.forEach(file => {
|
|
18
|
+
rimraf(file).then((deleted) => {
|
|
19
|
+
if (!deleted) console.error(`Error deleting ${file}:`, err);
|
|
20
|
+
else console.log(`Deleted ${file}`);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
## 快速上手
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
# 初始化安装依赖
|
|
6
|
+
pnpm install
|
|
7
|
+
|
|
8
|
+
# 清理所有依赖
|
|
9
|
+
pnpm run clean
|
|
10
|
+
pnpm run clean:win
|
|
11
|
+
|
|
12
|
+
# 开发模式启动
|
|
13
|
+
pnpm run dev
|
|
14
|
+
|
|
15
|
+
# 构建生产sdk包
|
|
16
|
+
|
|
17
|
+
# mac 环境
|
|
18
|
+
pnpm run build
|
|
19
|
+
|
|
20
|
+
# windows环境
|
|
21
|
+
pnpm run build-win
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 工程分层说明
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
# ss-boot
|
|
29
|
+
不做业务研发,只做包的组装和依赖
|
|
30
|
+
|
|
31
|
+
# ss-oinone
|
|
32
|
+
与Oinone结合层,这个工程结构可以把数式Oinone的改造收口,也是业务工程依赖的核心层
|
|
33
|
+
|
|
34
|
+
# ss-admin-widget
|
|
35
|
+
与界面设计器无代码的结合工程,在这个工程结构里可以把组件放在无代码平台上使用
|
|
36
|
+
|
|
37
|
+
# ss-project
|
|
38
|
+
模拟的项目工程,做某个项目的个性化开发
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 修改开发模式后端 api 地址
|
|
42
|
+
|
|
43
|
+
修改文件 `packages/ss-boot/vue.config.js` 的 `devServer.proxy.pamirs.target` 指向需要的后端地址。
|
|
44
|
+
|
|
45
|
+
## 前端环境
|
|
46
|
+
|
|
47
|
+
**.npmrc**
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
registry=https://registry.npmmirror.com/
|
|
51
|
+
@oinone:registry=http://nexus.shushi.pro/repository/kunlun/
|
|
52
|
+
legacy-peer-deps=true
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 登录npm源
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
npm login --registry "http://nexus.shushi.pro/repository/kunlun/"
|
|
59
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ss-front-modules",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "pnpm lerna exec --scope ss-boot -- npm run dev",
|
|
7
|
+
"clean": "pnpm lerna run clean --parallel && rimraf package-lock.json pnpm-lock.yaml node_modules",
|
|
8
|
+
"clean:win": "node ./scripts/clean.mjs",
|
|
9
|
+
"build": "pnpm lerna run build --parallel",
|
|
10
|
+
"build-win": "pnpm lerna run build-win --parallel",
|
|
11
|
+
"publish": "pnpm lerna publish --no-git-tag-version --no-push --exact -y"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@commitlint/cli": "20.2.0",
|
|
15
|
+
"@commitlint/config-conventional": "20.2.0",
|
|
16
|
+
"@rollup/plugin-commonjs": "29.0.0",
|
|
17
|
+
"@rollup/plugin-json": "6.1.0",
|
|
18
|
+
"@rollup/plugin-node-resolve": "16.0.3",
|
|
19
|
+
"@rollup/plugin-replace": "6.0.3",
|
|
20
|
+
"@rollup/plugin-terser": "0.4.4",
|
|
21
|
+
"@rollup/plugin-typescript": "12.3.0",
|
|
22
|
+
"@types/node": "24.10.4",
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "8.50.0",
|
|
24
|
+
"@typescript-eslint/parser": "8.50.0",
|
|
25
|
+
"@vue/eslint-config-typescript": "14.6.0",
|
|
26
|
+
"esbuild": "0.27.2",
|
|
27
|
+
"eslint": "9.39.2",
|
|
28
|
+
"eslint-config-prettier": "10.1.8",
|
|
29
|
+
"eslint-import-resolver-typescript": "4.4.4",
|
|
30
|
+
"eslint-plugin-import": "2.32.0",
|
|
31
|
+
"eslint-plugin-prettier": "5.5.4",
|
|
32
|
+
"eslint-plugin-vue": "10.5.1",
|
|
33
|
+
"husky": "9.1.7",
|
|
34
|
+
"jiti": "2.6.1",
|
|
35
|
+
"lerna": "9.0.3",
|
|
36
|
+
"lint-staged": "10.4.2",
|
|
37
|
+
"postcss": "8.5.6",
|
|
38
|
+
"postcss-pxtorem": "6.1.0",
|
|
39
|
+
"prettier": "3.6.2",
|
|
40
|
+
"rimraf": "6.1.2",
|
|
41
|
+
"rollup": "4.53.5",
|
|
42
|
+
"rollup-plugin-copy": "3.4.0",
|
|
43
|
+
"rollup-plugin-esbuild": "6.2.1",
|
|
44
|
+
"rollup-plugin-postcss": "4.0.2",
|
|
45
|
+
"rollup-plugin-scss": "4.0.1",
|
|
46
|
+
"rollup-plugin-sourcemaps": "0.6.3",
|
|
47
|
+
"rollup-plugin-typescript2": "0.36.0",
|
|
48
|
+
"rollup-plugin-visualizer": "6.0.5",
|
|
49
|
+
"rollup-plugin-vue": "6.0.0",
|
|
50
|
+
"sass": "1.97.0",
|
|
51
|
+
"sass-loader": "16.0.6",
|
|
52
|
+
"tslib": "2.8.1",
|
|
53
|
+
"typescript": "5.9.3",
|
|
54
|
+
"vue-eslint-parser": "10.2.0",
|
|
55
|
+
"vue-tsc": "3.1.8"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import pluginOinone from '@oinone/kunlun-compile/eslint';
|
|
2
|
+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';
|
|
3
|
+
import { globalIgnores } from 'eslint/config';
|
|
4
|
+
import pluginVue from 'eslint-plugin-vue';
|
|
5
|
+
|
|
6
|
+
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
|
|
7
|
+
// import { configureVueProject } from '@vue/eslint-config-typescript'
|
|
8
|
+
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
|
|
9
|
+
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
|
|
10
|
+
|
|
11
|
+
export default defineConfigWithVueTs(
|
|
12
|
+
{
|
|
13
|
+
name: 'app/files-to-lint',
|
|
14
|
+
files: ['**/*.{ts,mts,tsx,vue}']
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
globalIgnores(['**/__tests__/**', '**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
|
18
|
+
|
|
19
|
+
pluginVue.configs['flat/essential'],
|
|
20
|
+
vueTsConfigs.recommended,
|
|
21
|
+
pluginOinone.common,
|
|
22
|
+
pluginOinone.importExportRules
|
|
23
|
+
);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
.pnp
|
|
4
|
+
.pnp.js
|
|
5
|
+
|
|
6
|
+
# Build Output
|
|
7
|
+
dist/
|
|
8
|
+
dist-ssr/
|
|
9
|
+
build/
|
|
10
|
+
out/
|
|
11
|
+
coverage/
|
|
12
|
+
|
|
13
|
+
# Vue / React / Framework specific
|
|
14
|
+
.nuxt/
|
|
15
|
+
.next/
|
|
16
|
+
.output/
|
|
17
|
+
.vuepress/dist/
|
|
18
|
+
.docusaurus/
|
|
19
|
+
|
|
20
|
+
# Environment Variables
|
|
21
|
+
.env
|
|
22
|
+
.env.local
|
|
23
|
+
.env.development.local
|
|
24
|
+
.env.test.local
|
|
25
|
+
.env.production.local
|
|
26
|
+
|
|
27
|
+
# Logs
|
|
28
|
+
npm-debug.log*
|
|
29
|
+
yarn-debug.log*
|
|
30
|
+
yarn-error.log*
|
|
31
|
+
pnpm-debug.log*
|
|
32
|
+
*.log
|
|
33
|
+
|
|
34
|
+
# Editor & OS Files
|
|
35
|
+
.vscode/
|
|
36
|
+
.idea/
|
|
37
|
+
*.suo
|
|
38
|
+
*.ntvs*
|
|
39
|
+
*.njsproj
|
|
40
|
+
*.sln
|
|
41
|
+
*.sw?
|
|
42
|
+
.DS_Store
|
|
43
|
+
.DS_Store?
|
|
44
|
+
._*
|
|
45
|
+
.Spotlight-V100
|
|
46
|
+
.Trashes
|
|
47
|
+
ehthumbs.db
|
|
48
|
+
Thumbs.db
|
|
49
|
+
|
|
50
|
+
# Lockfiles (Optional depending on project standard, usually kept in VC)
|
|
51
|
+
package-lock.json
|
|
52
|
+
yarn.lock
|
|
53
|
+
pnpm-lock.yaml
|
|
54
|
+
|
|
55
|
+
# Local configuration
|
|
56
|
+
.eslintcache
|
|
57
|
+
.stylelintcache
|
|
58
|
+
*.tsbuildinfo
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ss/admin-widget",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.ts",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"clean": "rimraf dist package-lock.json node_modules",
|
|
7
|
+
"prebuild": "rimraf dist",
|
|
8
|
+
"build": "rollup -c && npm run build-css",
|
|
9
|
+
"build-css": "[ -f './dist/kunlun-module-demo.scss' ] && sass ./dist/kunlun-module-demo.scss ./dist/kunlun-module-demo.css || exit 0",
|
|
10
|
+
"build-win": "rollup -c && npm run build-css-win",
|
|
11
|
+
"build-css-win": "IF EXIST ./dist/kunlun-module-demo.scss (sass ./dist/kunlun-module-demo.scss ./dist/kunlun-module-demo.css) ELSE (exit 0)",
|
|
12
|
+
"prepublishOnly": "node ./scripts/prepublish-only.js",
|
|
13
|
+
"postpublish": "node ./scripts/postpublish.js"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@element-plus/icons-vue": "2.0.9",
|
|
17
|
+
"@oinone/kunlun-compile": "~7.2.0",
|
|
18
|
+
"@oinone/kunlun-dependencies": "~7.2.0",
|
|
19
|
+
"@oinone/kunlun-vue-ui-antd": "~7.2.0",
|
|
20
|
+
"@oinone/kunlun-vue-ui-el": "~7.2.0",
|
|
21
|
+
"@ss/oinone": "workspace:*",
|
|
22
|
+
"@types/lodash-es": "4.17.6",
|
|
23
|
+
"ant-design-vue": "4.2.6",
|
|
24
|
+
"element-plus": "2.13.0",
|
|
25
|
+
"vue": "3.5.26"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import CompileConfigBuilder from '@oinone/kunlun-compile';
|
|
2
|
+
|
|
3
|
+
export default CompileConfigBuilder.config()
|
|
4
|
+
.setLibraryName('ss-admin-widget')
|
|
5
|
+
.singleModule()
|
|
6
|
+
.replace()
|
|
7
|
+
.nodeResolve()
|
|
8
|
+
.commonjs()
|
|
9
|
+
.typescript2()
|
|
10
|
+
.json()
|
|
11
|
+
.terser()
|
|
12
|
+
.build();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* eslint-disable import/no-dynamic-require */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const url = path.resolve(process.cwd(), 'package.json');
|
|
6
|
+
const packageJSON = require(url);
|
|
7
|
+
|
|
8
|
+
packageJSON.main = 'index.ts';
|
|
9
|
+
delete packageJSON.module;
|
|
10
|
+
delete packageJSON.typings;
|
|
11
|
+
delete packageJSON.files;
|
|
12
|
+
|
|
13
|
+
fs.writeFileSync('package.json', JSON.stringify(packageJSON, null, 2));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* eslint-disable import/no-dynamic-require */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const url = path.resolve(process.cwd(), 'package.json');
|
|
6
|
+
const packageJSON = require(url);
|
|
7
|
+
|
|
8
|
+
const libName = packageJSON.name.replace('@', '').replace('/', '-');
|
|
9
|
+
|
|
10
|
+
packageJSON.main = `dist/${libName}.esm.js`;
|
|
11
|
+
packageJSON.module = `dist/${libName}.esm.js`;
|
|
12
|
+
const typings = 'dist/types/index.d.ts';
|
|
13
|
+
packageJSON.typings = typings;
|
|
14
|
+
|
|
15
|
+
const typingsUrl = path.resolve(process.cwd(), typings);
|
|
16
|
+
const dir = fs.existsSync(typingsUrl);
|
|
17
|
+
|
|
18
|
+
if (!dir) {
|
|
19
|
+
packageJSON.typings = 'dist/index.d.ts';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
packageJSON.files = ['dist'];
|
|
23
|
+
|
|
24
|
+
fs.writeFileSync('package.json', JSON.stringify(packageJSON, null, 2));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
STATIC_IMG=/oss/images
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ss-boot",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"clean": "rimraf dist package-lock.json node_modules",
|
|
7
|
+
"dev": "vue-cli-service serve",
|
|
8
|
+
"build": "node --max_old_space_size=4096 ./node_modules/@vue/cli-service/bin/vue-cli-service.js build"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@ant-design/icons-vue": "7.0.1",
|
|
12
|
+
"@antv/data-set": "^0.11.8",
|
|
13
|
+
"@antv/g2": "^5.4.8",
|
|
14
|
+
"@element-plus/icons-vue": "2.0.9",
|
|
15
|
+
"@oinone/kunlun-ai-dependencies": "~7.2.0",
|
|
16
|
+
"@oinone/kunlun-data-designer": "~7.2.0",
|
|
17
|
+
"@oinone/kunlun-data-designer-core": "~7.2.0",
|
|
18
|
+
"@oinone/kunlun-data-designer-open-pc": "~7.2.0",
|
|
19
|
+
"@oinone/kunlun-dependencies": "~7.2.0",
|
|
20
|
+
"@oinone/kunlun-designer-common": "~7.2.0",
|
|
21
|
+
"@oinone/kunlun-designer-common-ee": "~7.2.0",
|
|
22
|
+
"@oinone/kunlun-eip-dependencies": "~7.2.0",
|
|
23
|
+
"@oinone/kunlun-microflow-designer": "~7.2.0",
|
|
24
|
+
"@oinone/kunlun-model-designer": "~7.2.0",
|
|
25
|
+
"@oinone/kunlun-print-designer-dependencies": "~7.2.0",
|
|
26
|
+
"@oinone/kunlun-ui-designer-dependencies": "~7.2.0",
|
|
27
|
+
"@oinone/kunlun-vue-ui-antd": "~7.2.0",
|
|
28
|
+
"@oinone/kunlun-vue-ui-el": "~7.2.0",
|
|
29
|
+
"@oinone/kunlun-workflow": "~7.2.0",
|
|
30
|
+
"@oinone/kunlun-workflow-designer": "~7.2.0",
|
|
31
|
+
"@ss/admin-widget": "workspace:*",
|
|
32
|
+
"@ss/oinone": "workspace:*",
|
|
33
|
+
"@ss/project": "workspace:*",
|
|
34
|
+
"ant-design-vue": "4.2.6",
|
|
35
|
+
"echarts": "5.3.1",
|
|
36
|
+
"element-plus": "2.13.0",
|
|
37
|
+
"fast-xml-parser": "3.21.1",
|
|
38
|
+
"graphql": "15.8.0",
|
|
39
|
+
"graphql-tag": "2.12.6",
|
|
40
|
+
"lodash-es": "4.17.21",
|
|
41
|
+
"reflect-metadata": "0.2.2",
|
|
42
|
+
"rxjs": "6.6.7",
|
|
43
|
+
"vant": "4.9.22",
|
|
44
|
+
"vue": "3.5.26",
|
|
45
|
+
"vue3-draggable-resizable": "1.6.1",
|
|
46
|
+
"vuedraggable": "4.1.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@oinone/kunlun-compile": "~7.2.0",
|
|
50
|
+
"@types/lodash": "4.17.21",
|
|
51
|
+
"@types/lodash-es": "4.17.6",
|
|
52
|
+
"@vue/cli-plugin-eslint": "5.0.9",
|
|
53
|
+
"@vue/cli-plugin-typescript": "5.0.9",
|
|
54
|
+
"@vue/cli-service": "5.0.9",
|
|
55
|
+
"@vue/compiler-sfc": "3.5.26",
|
|
56
|
+
"cross-env": "10.1.0",
|
|
57
|
+
"dotenv-webpack": "8.1.1",
|
|
58
|
+
"thread-loader": "3.0.4",
|
|
59
|
+
"tslib": "2.8.1",
|
|
60
|
+
"typescript": "5.9.3",
|
|
61
|
+
"vue-tsc": "3.1.8",
|
|
62
|
+
"webpack": "5.104.1"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
File without changes
|