@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,50 @@
|
|
|
1
|
+
import 'ant-design-vue/dist/antd.min.css';
|
|
2
|
+
import 'element-plus/dist/index.css';
|
|
3
|
+
|
|
4
|
+
import '@oinone/kunlun-vue-ui-antd/dist/oinone-kunlun-vue-ui-antd.css';
|
|
5
|
+
import '@oinone/kunlun-vue-ui-el/dist/oinone-kunlun-vue-ui-el.css';
|
|
6
|
+
|
|
7
|
+
import '@oinone/kunlun-vue-ui-mobile-vant/dist/oinone-kunlun-vue-ui-mobile-vant.css';
|
|
8
|
+
import '@oinone/kunlun-vue-admin-base/dist/oinone-kunlun-vue-admin-base.css';
|
|
9
|
+
import '@oinone/kunlun-vue-admin-layout/dist/oinone-kunlun-vue-admin-layout.css';
|
|
10
|
+
|
|
11
|
+
import 'reflect-metadata';
|
|
12
|
+
import ElementPlus from 'element-plus';
|
|
13
|
+
import {App} from 'vue';
|
|
14
|
+
import {RuntimeContextManager, VueOioProvider} from '@oinone/kunlun-dependencies';
|
|
15
|
+
import 'vant/lib/index.css';
|
|
16
|
+
|
|
17
|
+
// 标准能力
|
|
18
|
+
import '@ss/oinone';
|
|
19
|
+
import '@ss/admin-widget';
|
|
20
|
+
// 个性化项目
|
|
21
|
+
import '@ss/project';
|
|
22
|
+
|
|
23
|
+
VueOioProvider(
|
|
24
|
+
{
|
|
25
|
+
browser: {
|
|
26
|
+
title: 'Oinone',
|
|
27
|
+
favicon: 'https://pamirs.oss-cn-hangzhou.aliyuncs.com/pamirs/image/default_favicon.ico'
|
|
28
|
+
},
|
|
29
|
+
dependencies: {
|
|
30
|
+
vue: import('vue'),
|
|
31
|
+
lodashEs: import('lodash-es'),
|
|
32
|
+
antDesignVue: import('ant-design-vue'),
|
|
33
|
+
antDesignIconsVue: import('@ant-design/icons-vue'),
|
|
34
|
+
elementPlusIconsVue: import('@element-plus/icons-vue'),
|
|
35
|
+
elementPlus: import('element-plus'),
|
|
36
|
+
kunlunDependencies: import('@oinone/kunlun-dependencies'),
|
|
37
|
+
kunlunVueUiAntd: import('@oinone/kunlun-vue-ui-antd'),
|
|
38
|
+
kunlunVueUiEl: import('@oinone/kunlun-vue-ui-el'),
|
|
39
|
+
antvDataSet: import('@antv/data-set'),
|
|
40
|
+
antvG2: import('@antv/g2'),
|
|
41
|
+
echarts: import('echarts')
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
[
|
|
45
|
+
() => {
|
|
46
|
+
const app = RuntimeContextManager.createOrReplace().frameworkInstance as App;
|
|
47
|
+
app.use(ElementPlus);
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"strict": true,
|
|
4
|
+
"target": "ES6",
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"importHelpers": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"experimentalDecorators": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"checkJs": false,
|
|
16
|
+
"noImplicitAny": false,
|
|
17
|
+
"baseUrl": ".",
|
|
18
|
+
"types": [
|
|
19
|
+
"webpack-env"
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": [
|
|
23
|
+
"src/*"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"lib": [
|
|
27
|
+
"ES2018",
|
|
28
|
+
"esnext",
|
|
29
|
+
"dom",
|
|
30
|
+
"dom.iterable",
|
|
31
|
+
"scripthost"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"include": [
|
|
35
|
+
"src/**/*.ts",
|
|
36
|
+
"src/**/*.tsx",
|
|
37
|
+
"src/**/*.vue"
|
|
38
|
+
],
|
|
39
|
+
"exclude": [
|
|
40
|
+
"node_modules",
|
|
41
|
+
"dist",
|
|
42
|
+
"!node_modules/@oinone/kunlun-shared/src" // 对此路径不排除(关键!)
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const Dotenv = require('dotenv-webpack');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
productionSourceMap: false,
|
|
5
|
+
publicPath: '/',
|
|
6
|
+
lintOnSave: false,
|
|
7
|
+
configureWebpack: {
|
|
8
|
+
resolve: {
|
|
9
|
+
fallback: {
|
|
10
|
+
crypto: false
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
plugins: [new Dotenv()]
|
|
14
|
+
},
|
|
15
|
+
chainWebpack: (config) => {
|
|
16
|
+
config.plugins.delete('fork-ts-checker');
|
|
17
|
+
config.cache({
|
|
18
|
+
type: 'filesystem' // 启用文件缓存
|
|
19
|
+
});
|
|
20
|
+
config.plugin('html').tap((args) => {
|
|
21
|
+
args[0].chunksSortMode = (a, b) => {
|
|
22
|
+
if (a.entry !== b.entry) {
|
|
23
|
+
// make sure entry is loaded last so user CSS can override
|
|
24
|
+
// vendor CSS
|
|
25
|
+
return b.entry ? -1 : 1;
|
|
26
|
+
} else {
|
|
27
|
+
return 0;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return args;
|
|
31
|
+
});
|
|
32
|
+
config.optimization.splitChunks({
|
|
33
|
+
...config.optimization.get('splitChunks'),
|
|
34
|
+
cacheGroups: {
|
|
35
|
+
libs: {
|
|
36
|
+
name: 'chunk-a',
|
|
37
|
+
test: /[\\/]node_modules[\\/]/,
|
|
38
|
+
priority: 1,
|
|
39
|
+
chunks: 'initial',
|
|
40
|
+
maxSize: 6000000,
|
|
41
|
+
minSize: 3000000,
|
|
42
|
+
maxInitialRequests: 5
|
|
43
|
+
},
|
|
44
|
+
kunlun: {
|
|
45
|
+
name: 'chunk-b',
|
|
46
|
+
test: /[\\/]node_modules[\\/]@oinone[\\/]/,
|
|
47
|
+
priority: 2,
|
|
48
|
+
chunks: 'initial',
|
|
49
|
+
maxSize: 6000000,
|
|
50
|
+
minSize: 3000000,
|
|
51
|
+
maxInitialRequests: 5
|
|
52
|
+
},
|
|
53
|
+
common: {
|
|
54
|
+
name: 'chunk-c',
|
|
55
|
+
minChunks: 2,
|
|
56
|
+
priority: 3,
|
|
57
|
+
chunks: 'initial',
|
|
58
|
+
reuseExistingChunk: true
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
devServer: {
|
|
64
|
+
port: 8080,
|
|
65
|
+
// disableHostCheck: true,
|
|
66
|
+
// progress: false,
|
|
67
|
+
hot: true,
|
|
68
|
+
compress: true, // 启用 gzip 压缩
|
|
69
|
+
client: {
|
|
70
|
+
overlay: false,
|
|
71
|
+
progress: true
|
|
72
|
+
},
|
|
73
|
+
proxy: {
|
|
74
|
+
'/pamirs': {
|
|
75
|
+
// 支持跨域
|
|
76
|
+
changeOrigin: true,
|
|
77
|
+
// 请求后端地址
|
|
78
|
+
target: 'http://127.0.0.1:8091'
|
|
79
|
+
// Oinone 提供的演示环境地址
|
|
80
|
+
// target: 'https://demo.oinone.top'
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ss/oinone",
|
|
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
|
+
"dependencies": {
|
|
16
|
+
"lucide": "1.7.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@ant-design/icons-vue": "7.0.1",
|
|
20
|
+
"@element-plus/icons-vue": "2.0.9",
|
|
21
|
+
"@oinone/kunlun-dependencies": "~6.4.0",
|
|
22
|
+
"@oinone/kunlun-vue-ui-antd": "~6.4.0",
|
|
23
|
+
"@oinone/kunlun-vue-ui-el": "~6.4.0",
|
|
24
|
+
"@types/lodash-es": "4.17.6",
|
|
25
|
+
"ant-design-vue": "3.2.14",
|
|
26
|
+
"element-plus": "2.2.17",
|
|
27
|
+
"vue": "3.2.40"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import json from '@rollup/plugin-json';
|
|
2
|
+
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
3
|
+
import replace from '@rollup/plugin-replace';
|
|
4
|
+
import commonjs from 'rollup-plugin-commonjs';
|
|
5
|
+
import scss from 'rollup-plugin-scss';
|
|
6
|
+
import typescript from 'rollup-plugin-typescript2';
|
|
7
|
+
import vue from 'rollup-plugin-vue';
|
|
8
|
+
|
|
9
|
+
const libraryName = 'ss-oinone';
|
|
10
|
+
|
|
11
|
+
const external = [
|
|
12
|
+
'vue',
|
|
13
|
+
'lodash-es',
|
|
14
|
+
'ant-design-vue',
|
|
15
|
+
'@element-plus/icons-vue',
|
|
16
|
+
'element-plus',
|
|
17
|
+
'@oinone/kunlun-dependencies',
|
|
18
|
+
'@oinone/kunlun-vue-ui-antd',
|
|
19
|
+
'@oinone/kunlun-vue-ui-el'
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const tsconfigOverride = {
|
|
23
|
+
compilerOptions: {
|
|
24
|
+
outDir: 'dist',
|
|
25
|
+
declaration: true,
|
|
26
|
+
declarationDir: 'dist/types'
|
|
27
|
+
},
|
|
28
|
+
include: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.vue'],
|
|
29
|
+
exclude: ['tests/**/*.ts', 'tests/**/*.tsx']
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const plugins = [
|
|
33
|
+
replace({
|
|
34
|
+
'process.env.NODE_ENV': JSON.stringify('development'),
|
|
35
|
+
preventAssignment: true
|
|
36
|
+
}),
|
|
37
|
+
nodeResolve({
|
|
38
|
+
extensions: ['.mjs', '.js', '.json', '.node', '.ts', '.tsx', '.vue']
|
|
39
|
+
}),
|
|
40
|
+
|
|
41
|
+
typescript({
|
|
42
|
+
useTsconfigDeclarationDir: true,
|
|
43
|
+
tsconfigOverride,
|
|
44
|
+
include: ['**/*.ts', '**/*.tsx'],
|
|
45
|
+
check: false
|
|
46
|
+
}),
|
|
47
|
+
|
|
48
|
+
vue({
|
|
49
|
+
preprocessStyles: true,
|
|
50
|
+
needMap: false
|
|
51
|
+
}),
|
|
52
|
+
|
|
53
|
+
scss({
|
|
54
|
+
fileName: `${libraryName}.scss`,
|
|
55
|
+
output: `dist/${libraryName}.scss`,
|
|
56
|
+
sourceMap: false,
|
|
57
|
+
outputStyle: 'compressed'
|
|
58
|
+
}),
|
|
59
|
+
|
|
60
|
+
json(),
|
|
61
|
+
commonjs()
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
input: `index.ts`,
|
|
66
|
+
output: [
|
|
67
|
+
{
|
|
68
|
+
file: `dist/${libraryName}.esm.js`,
|
|
69
|
+
format: 'esm',
|
|
70
|
+
sourcemap: false
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
onwarn(warning) {
|
|
74
|
+
if (warning.code === 'THIS_IS_UNDEFINED' || /Circular/.test(warning.message)) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
console.error(warning.message);
|
|
79
|
+
},
|
|
80
|
+
external,
|
|
81
|
+
plugins
|
|
82
|
+
};
|
|
@@ -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,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"strict": true,
|
|
4
|
+
"target": "ES6",
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"importHelpers": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"experimentalDecorators": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"checkJs": false,
|
|
16
|
+
"noImplicitAny": false,
|
|
17
|
+
"baseUrl": ".",
|
|
18
|
+
"types": [
|
|
19
|
+
"webpack-env"
|
|
20
|
+
],
|
|
21
|
+
"paths": {},
|
|
22
|
+
"lib": [
|
|
23
|
+
"ES2018",
|
|
24
|
+
"esnext",
|
|
25
|
+
"dom",
|
|
26
|
+
"dom.iterable",
|
|
27
|
+
"scripthost"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"include": [
|
|
31
|
+
"index.ts",
|
|
32
|
+
"src/**/*.ts",
|
|
33
|
+
"src/**/*.tsx",
|
|
34
|
+
"src/**/*.vue",
|
|
35
|
+
"tests/**/*.ts",
|
|
36
|
+
"tests/**/*.tsx"
|
|
37
|
+
],
|
|
38
|
+
"exclude": [
|
|
39
|
+
"node_modules",
|
|
40
|
+
"dist"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ss/project",
|
|
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
|
+
"dependencies": {
|
|
16
|
+
"lucide": "1.7.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@element-plus/icons-vue": "2.0.9",
|
|
20
|
+
"@oinone/kunlun-dependencies": "~6.4.0",
|
|
21
|
+
"@oinone/kunlun-vue-ui-antd": "~6.4.0",
|
|
22
|
+
"@oinone/kunlun-vue-ui-el": "~6.4.0",
|
|
23
|
+
"@ss/admin-widget": "workspace:*",
|
|
24
|
+
"@ss/oinone": "workspace:*",
|
|
25
|
+
"@types/lodash-es": "4.17.6",
|
|
26
|
+
"ant-design-vue": "3.2.14",
|
|
27
|
+
"element-plus": "2.2.17",
|
|
28
|
+
"vue": "3.2.40"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import json from '@rollup/plugin-json';
|
|
2
|
+
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
3
|
+
import replace from '@rollup/plugin-replace';
|
|
4
|
+
import commonjs from 'rollup-plugin-commonjs';
|
|
5
|
+
import scss from 'rollup-plugin-scss';
|
|
6
|
+
import typescript from 'rollup-plugin-typescript2';
|
|
7
|
+
import vue from 'rollup-plugin-vue';
|
|
8
|
+
|
|
9
|
+
const libraryName = 'ss-project';
|
|
10
|
+
|
|
11
|
+
const external = [
|
|
12
|
+
'vue',
|
|
13
|
+
'lodash-es',
|
|
14
|
+
'ant-design-vue',
|
|
15
|
+
'@element-plus/icons-vue',
|
|
16
|
+
'element-plus',
|
|
17
|
+
'@oinone/kunlun-dependencies',
|
|
18
|
+
'@oinone/kunlun-vue-ui-antd',
|
|
19
|
+
'@oinone/kunlun-vue-ui-el',
|
|
20
|
+
'@ss/oinone'
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const tsconfigOverride = {
|
|
24
|
+
compilerOptions: {
|
|
25
|
+
outDir: 'dist',
|
|
26
|
+
declaration: true,
|
|
27
|
+
declarationDir: 'dist/types'
|
|
28
|
+
},
|
|
29
|
+
include: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.vue'],
|
|
30
|
+
exclude: ['tests/**/*.ts', 'tests/**/*.tsx']
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const plugins = [
|
|
34
|
+
replace({
|
|
35
|
+
'process.env.NODE_ENV': JSON.stringify('development'),
|
|
36
|
+
preventAssignment: true
|
|
37
|
+
}),
|
|
38
|
+
nodeResolve({
|
|
39
|
+
extensions: ['.mjs', '.js', '.json', '.node', '.ts', '.tsx', '.vue']
|
|
40
|
+
}),
|
|
41
|
+
|
|
42
|
+
typescript({
|
|
43
|
+
useTsconfigDeclarationDir: true,
|
|
44
|
+
tsconfigOverride,
|
|
45
|
+
include: ['**/*.ts', '**/*.tsx'],
|
|
46
|
+
check: false
|
|
47
|
+
}),
|
|
48
|
+
|
|
49
|
+
vue({
|
|
50
|
+
preprocessStyles: true,
|
|
51
|
+
needMap: false
|
|
52
|
+
}),
|
|
53
|
+
|
|
54
|
+
scss({
|
|
55
|
+
fileName: `${libraryName}.scss`,
|
|
56
|
+
output: `dist/${libraryName}.scss`,
|
|
57
|
+
sourceMap: false,
|
|
58
|
+
outputStyle: 'compressed'
|
|
59
|
+
}),
|
|
60
|
+
|
|
61
|
+
json(),
|
|
62
|
+
commonjs()
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
export default {
|
|
66
|
+
input: `index.ts`,
|
|
67
|
+
output: [
|
|
68
|
+
{
|
|
69
|
+
file: `dist/${libraryName}.esm.js`,
|
|
70
|
+
format: 'esm',
|
|
71
|
+
sourcemap: false
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
onwarn(warning) {
|
|
75
|
+
if (warning.code === 'THIS_IS_UNDEFINED' || /Circular/.test(warning.message)) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
console.error(warning.message);
|
|
80
|
+
},
|
|
81
|
+
external,
|
|
82
|
+
plugins
|
|
83
|
+
};
|
|
@@ -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,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"strict": true,
|
|
4
|
+
"target": "ES6",
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"importHelpers": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"experimentalDecorators": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"checkJs": false,
|
|
16
|
+
"noImplicitAny": false,
|
|
17
|
+
"baseUrl": ".",
|
|
18
|
+
"types": [
|
|
19
|
+
"webpack-env"
|
|
20
|
+
],
|
|
21
|
+
"paths": {},
|
|
22
|
+
"lib": [
|
|
23
|
+
"ES2018",
|
|
24
|
+
"esnext",
|
|
25
|
+
"dom",
|
|
26
|
+
"dom.iterable",
|
|
27
|
+
"scripthost"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"include": [
|
|
31
|
+
"index.ts",
|
|
32
|
+
"src/**/*.ts",
|
|
33
|
+
"src/**/*.tsx",
|
|
34
|
+
"src/**/*.vue",
|
|
35
|
+
"tests/**/*.ts",
|
|
36
|
+
"tests/**/*.tsx"
|
|
37
|
+
],
|
|
38
|
+
"exclude": [
|
|
39
|
+
"node_modules",
|
|
40
|
+
"dist"
|
|
41
|
+
]
|
|
42
|
+
}
|