@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.
Files changed (206) hide show
  1. package/README.md +115 -0
  2. package/README_zh-CN.md +115 -0
  3. package/bin/cli.js +429 -0
  4. package/package.json +25 -0
  5. package/template-6.4.0-community/.eslintignore +5 -0
  6. package/template-6.4.0-community/.eslintrc.json +72 -0
  7. package/template-6.4.0-community/.prettierrc.json +8 -0
  8. package/template-6.4.0-community/README.md +59 -0
  9. package/template-6.4.0-community/_package.json +47 -0
  10. package/template-6.4.0-community/gitignore +58 -0
  11. package/template-6.4.0-community/lerna.json +12 -0
  12. package/template-6.4.0-community/npmrc +3 -0
  13. package/template-6.4.0-community/packages/ss-admin-widget/index.ts +1 -0
  14. package/template-6.4.0-community/packages/ss-admin-widget/package.json +25 -0
  15. package/template-6.4.0-community/packages/ss-admin-widget/rollup.config.js +73 -0
  16. package/template-6.4.0-community/packages/ss-admin-widget/scripts/postpublish.js +13 -0
  17. package/template-6.4.0-community/packages/ss-admin-widget/scripts/prepublish-only.js +24 -0
  18. package/template-6.4.0-community/packages/ss-admin-widget/src/index.ts +1 -0
  19. package/template-6.4.0-community/packages/ss-admin-widget/src/shim-translate.d.ts +10 -0
  20. package/template-6.4.0-community/packages/ss-admin-widget/src/shim-vue.d.ts +6 -0
  21. package/template-6.4.0-community/packages/ss-admin-widget/tsconfig.json +45 -0
  22. package/template-6.4.0-community/packages/ss-boot/.env +1 -0
  23. package/template-6.4.0-community/packages/ss-boot/.env.example +6 -0
  24. package/template-6.4.0-community/packages/ss-boot/package.json +53 -0
  25. package/template-6.4.0-community/packages/ss-boot/public/favicon.ico +0 -0
  26. package/template-6.4.0-community/packages/ss-boot/public/index.html +83 -0
  27. package/template-6.4.0-community/packages/ss-boot/public/manifest.js +5 -0
  28. package/template-6.4.0-community/packages/ss-boot/src/main.ts +50 -0
  29. package/template-6.4.0-community/packages/ss-boot/src/shim-translate.d.ts +10 -0
  30. package/template-6.4.0-community/packages/ss-boot/src/shim-vue.d.ts +6 -0
  31. package/template-6.4.0-community/packages/ss-boot/tsconfig.json +44 -0
  32. package/template-6.4.0-community/packages/ss-boot/vue.config.js +84 -0
  33. package/template-6.4.0-community/packages/ss-oinone/index.ts +1 -0
  34. package/template-6.4.0-community/packages/ss-oinone/package.json +29 -0
  35. package/template-6.4.0-community/packages/ss-oinone/rollup.config.js +82 -0
  36. package/template-6.4.0-community/packages/ss-oinone/scripts/postpublish.js +13 -0
  37. package/template-6.4.0-community/packages/ss-oinone/scripts/prepublish-only.js +24 -0
  38. package/template-6.4.0-community/packages/ss-oinone/src/index.ts +1 -0
  39. package/template-6.4.0-community/packages/ss-oinone/src/shim-translate.d.ts +10 -0
  40. package/template-6.4.0-community/packages/ss-oinone/src/shim-vue.d.ts +6 -0
  41. package/template-6.4.0-community/packages/ss-oinone/tsconfig.json +42 -0
  42. package/template-6.4.0-community/packages/ss-project/index.ts +1 -0
  43. package/template-6.4.0-community/packages/ss-project/package.json +30 -0
  44. package/template-6.4.0-community/packages/ss-project/rollup.config.js +83 -0
  45. package/template-6.4.0-community/packages/ss-project/scripts/postpublish.js +13 -0
  46. package/template-6.4.0-community/packages/ss-project/scripts/prepublish-only.js +24 -0
  47. package/template-6.4.0-community/packages/ss-project/src/index.ts +1 -0
  48. package/template-6.4.0-community/packages/ss-project/src/shim-translate.d.ts +10 -0
  49. package/template-6.4.0-community/packages/ss-project/src/shim-vue.d.ts +6 -0
  50. package/template-6.4.0-community/packages/ss-project/tsconfig.json +42 -0
  51. package/template-6.4.0-community/pnpm-workspace.yaml +3 -0
  52. package/template-6.4.0-community/scripts/build/inset-tsconfig.js +68 -0
  53. package/template-6.4.0-community/scripts/build/package-name.js +25 -0
  54. package/template-6.4.0-community/scripts/build/postbuild.js +42 -0
  55. package/template-6.4.0-community/scripts/build/prebuild-only.js +48 -0
  56. package/template-6.4.0-community/scripts/clean.mjs +22 -0
  57. package/template-6.4.0-enterprise/.eslintignore +5 -0
  58. package/template-6.4.0-enterprise/.eslintrc.json +72 -0
  59. package/template-6.4.0-enterprise/.prettierrc.json +8 -0
  60. package/template-6.4.0-enterprise/README.md +59 -0
  61. package/template-6.4.0-enterprise/_package.json +47 -0
  62. package/template-6.4.0-enterprise/gitignore +58 -0
  63. package/template-6.4.0-enterprise/lerna.json +12 -0
  64. package/template-6.4.0-enterprise/npmrc +3 -0
  65. package/template-6.4.0-enterprise/packages/ss-admin-widget/index.ts +1 -0
  66. package/template-6.4.0-enterprise/packages/ss-admin-widget/package.json +25 -0
  67. package/template-6.4.0-enterprise/packages/ss-admin-widget/rollup.config.js +73 -0
  68. package/template-6.4.0-enterprise/packages/ss-admin-widget/scripts/postpublish.js +13 -0
  69. package/template-6.4.0-enterprise/packages/ss-admin-widget/scripts/prepublish-only.js +24 -0
  70. package/template-6.4.0-enterprise/packages/ss-admin-widget/src/index.ts +1 -0
  71. package/template-6.4.0-enterprise/packages/ss-admin-widget/src/shim-translate.d.ts +10 -0
  72. package/template-6.4.0-enterprise/packages/ss-admin-widget/src/shim-vue.d.ts +6 -0
  73. package/template-6.4.0-enterprise/packages/ss-admin-widget/tsconfig.json +45 -0
  74. package/template-6.4.0-enterprise/packages/ss-boot/.env +1 -0
  75. package/template-6.4.0-enterprise/packages/ss-boot/.env.example +6 -0
  76. package/template-6.4.0-enterprise/packages/ss-boot/package.json +66 -0
  77. package/template-6.4.0-enterprise/packages/ss-boot/public/favicon.ico +0 -0
  78. package/template-6.4.0-enterprise/packages/ss-boot/public/index.html +83 -0
  79. package/template-6.4.0-enterprise/packages/ss-boot/public/manifest.js +5 -0
  80. package/template-6.4.0-enterprise/packages/ss-boot/src/main.ts +69 -0
  81. package/template-6.4.0-enterprise/packages/ss-boot/src/shim-translate.d.ts +10 -0
  82. package/template-6.4.0-enterprise/packages/ss-boot/src/shim-vue.d.ts +6 -0
  83. package/template-6.4.0-enterprise/packages/ss-boot/tsconfig.json +44 -0
  84. package/template-6.4.0-enterprise/packages/ss-boot/vue.config.js +84 -0
  85. package/template-6.4.0-enterprise/packages/ss-oinone/index.ts +1 -0
  86. package/template-6.4.0-enterprise/packages/ss-oinone/package.json +29 -0
  87. package/template-6.4.0-enterprise/packages/ss-oinone/rollup.config.js +82 -0
  88. package/template-6.4.0-enterprise/packages/ss-oinone/scripts/postpublish.js +13 -0
  89. package/template-6.4.0-enterprise/packages/ss-oinone/scripts/prepublish-only.js +24 -0
  90. package/template-6.4.0-enterprise/packages/ss-oinone/src/index.ts +1 -0
  91. package/template-6.4.0-enterprise/packages/ss-oinone/src/shim-translate.d.ts +10 -0
  92. package/template-6.4.0-enterprise/packages/ss-oinone/src/shim-vue.d.ts +6 -0
  93. package/template-6.4.0-enterprise/packages/ss-oinone/tsconfig.json +42 -0
  94. package/template-6.4.0-enterprise/packages/ss-project/index.ts +1 -0
  95. package/template-6.4.0-enterprise/packages/ss-project/package.json +30 -0
  96. package/template-6.4.0-enterprise/packages/ss-project/rollup.config.js +83 -0
  97. package/template-6.4.0-enterprise/packages/ss-project/scripts/postpublish.js +13 -0
  98. package/template-6.4.0-enterprise/packages/ss-project/scripts/prepublish-only.js +24 -0
  99. package/template-6.4.0-enterprise/packages/ss-project/src/index.ts +1 -0
  100. package/template-6.4.0-enterprise/packages/ss-project/src/shim-translate.d.ts +10 -0
  101. package/template-6.4.0-enterprise/packages/ss-project/src/shim-vue.d.ts +6 -0
  102. package/template-6.4.0-enterprise/packages/ss-project/tsconfig.json +42 -0
  103. package/template-6.4.0-enterprise/pnpm-workspace.yaml +3 -0
  104. package/template-6.4.0-enterprise/scripts/build/inset-tsconfig.js +68 -0
  105. package/template-6.4.0-enterprise/scripts/build/package-name.js +25 -0
  106. package/template-6.4.0-enterprise/scripts/build/postbuild.js +42 -0
  107. package/template-6.4.0-enterprise/scripts/build/prebuild-only.js +48 -0
  108. package/template-6.4.0-enterprise/scripts/clean.mjs +22 -0
  109. package/template-7.2.0-community/.prettierrc.json +8 -0
  110. package/template-7.2.0-community/README.md +59 -0
  111. package/template-7.2.0-community/_package.json +57 -0
  112. package/template-7.2.0-community/eslint.config.ts +23 -0
  113. package/template-7.2.0-community/gitignore +58 -0
  114. package/template-7.2.0-community/lerna.json +12 -0
  115. package/template-7.2.0-community/npmrc +3 -0
  116. package/template-7.2.0-community/packages/ss-admin-widget/index.ts +1 -0
  117. package/template-7.2.0-community/packages/ss-admin-widget/package.json +27 -0
  118. package/template-7.2.0-community/packages/ss-admin-widget/rollup.config.js +12 -0
  119. package/template-7.2.0-community/packages/ss-admin-widget/scripts/postpublish.js +13 -0
  120. package/template-7.2.0-community/packages/ss-admin-widget/scripts/prepublish-only.js +24 -0
  121. package/template-7.2.0-community/packages/ss-admin-widget/src/index.ts +1 -0
  122. package/template-7.2.0-community/packages/ss-admin-widget/src/shim-translate.d.ts +10 -0
  123. package/template-7.2.0-community/packages/ss-admin-widget/src/shim-vue.d.ts +6 -0
  124. package/template-7.2.0-community/packages/ss-admin-widget/tsconfig.json +14 -0
  125. package/template-7.2.0-community/packages/ss-boot/.env +1 -0
  126. package/template-7.2.0-community/packages/ss-boot/.env.example +6 -0
  127. package/template-7.2.0-community/packages/ss-boot/package.json +51 -0
  128. package/template-7.2.0-community/packages/ss-boot/public/favicon.ico +0 -0
  129. package/template-7.2.0-community/packages/ss-boot/public/index.html +83 -0
  130. package/template-7.2.0-community/packages/ss-boot/public/manifest.js +5 -0
  131. package/template-7.2.0-community/packages/ss-boot/src/main.ts +46 -0
  132. package/template-7.2.0-community/packages/ss-boot/src/shim-translate.d.ts +10 -0
  133. package/template-7.2.0-community/packages/ss-boot/src/shim-vue.d.ts +6 -0
  134. package/template-7.2.0-community/packages/ss-boot/tsconfig.json +27 -0
  135. package/template-7.2.0-community/packages/ss-boot/vue.config.js +87 -0
  136. package/template-7.2.0-community/packages/ss-oinone/index.ts +1 -0
  137. package/template-7.2.0-community/packages/ss-oinone/package.json +30 -0
  138. package/template-7.2.0-community/packages/ss-oinone/rollup.config.js +12 -0
  139. package/template-7.2.0-community/packages/ss-oinone/scripts/postpublish.js +13 -0
  140. package/template-7.2.0-community/packages/ss-oinone/scripts/prepublish-only.js +24 -0
  141. package/template-7.2.0-community/packages/ss-oinone/src/index.ts +1 -0
  142. package/template-7.2.0-community/packages/ss-oinone/src/shim-translate.d.ts +10 -0
  143. package/template-7.2.0-community/packages/ss-oinone/src/shim-vue.d.ts +6 -0
  144. package/template-7.2.0-community/packages/ss-oinone/tsconfig.json +14 -0
  145. package/template-7.2.0-community/packages/ss-project/index.ts +1 -0
  146. package/template-7.2.0-community/packages/ss-project/package.json +30 -0
  147. package/template-7.2.0-community/packages/ss-project/rollup.config.js +12 -0
  148. package/template-7.2.0-community/packages/ss-project/scripts/postpublish.js +13 -0
  149. package/template-7.2.0-community/packages/ss-project/scripts/prepublish-only.js +24 -0
  150. package/template-7.2.0-community/packages/ss-project/src/index.ts +1 -0
  151. package/template-7.2.0-community/packages/ss-project/src/shim-translate.d.ts +10 -0
  152. package/template-7.2.0-community/packages/ss-project/src/shim-vue.d.ts +6 -0
  153. package/template-7.2.0-community/packages/ss-project/tsconfig.json +14 -0
  154. package/template-7.2.0-community/pnpm-workspace.yaml +3 -0
  155. package/template-7.2.0-community/scripts/build/inset-tsconfig.js +68 -0
  156. package/template-7.2.0-community/scripts/build/package-name.js +25 -0
  157. package/template-7.2.0-community/scripts/clean.mjs +22 -0
  158. package/template-7.2.0-enterprise/.prettierrc.json +8 -0
  159. package/template-7.2.0-enterprise/README.md +59 -0
  160. package/template-7.2.0-enterprise/_package.json +57 -0
  161. package/template-7.2.0-enterprise/eslint.config.ts +23 -0
  162. package/template-7.2.0-enterprise/gitignore +58 -0
  163. package/template-7.2.0-enterprise/lerna.json +12 -0
  164. package/template-7.2.0-enterprise/npmrc +3 -0
  165. package/template-7.2.0-enterprise/packages/ss-admin-widget/index.ts +1 -0
  166. package/template-7.2.0-enterprise/packages/ss-admin-widget/package.json +27 -0
  167. package/template-7.2.0-enterprise/packages/ss-admin-widget/rollup.config.js +12 -0
  168. package/template-7.2.0-enterprise/packages/ss-admin-widget/scripts/postpublish.js +13 -0
  169. package/template-7.2.0-enterprise/packages/ss-admin-widget/scripts/prepublish-only.js +24 -0
  170. package/template-7.2.0-enterprise/packages/ss-admin-widget/src/index.ts +1 -0
  171. package/template-7.2.0-enterprise/packages/ss-admin-widget/src/shim-translate.d.ts +10 -0
  172. package/template-7.2.0-enterprise/packages/ss-admin-widget/src/shim-vue.d.ts +6 -0
  173. package/template-7.2.0-enterprise/packages/ss-admin-widget/tsconfig.json +14 -0
  174. package/template-7.2.0-enterprise/packages/ss-boot/.env +1 -0
  175. package/template-7.2.0-enterprise/packages/ss-boot/.env.example +6 -0
  176. package/template-7.2.0-enterprise/packages/ss-boot/package.json +64 -0
  177. package/template-7.2.0-enterprise/packages/ss-boot/public/favicon.ico +0 -0
  178. package/template-7.2.0-enterprise/packages/ss-boot/public/index.html +83 -0
  179. package/template-7.2.0-enterprise/packages/ss-boot/public/manifest.js +5 -0
  180. package/template-7.2.0-enterprise/packages/ss-boot/src/main.ts +66 -0
  181. package/template-7.2.0-enterprise/packages/ss-boot/src/shim-translate.d.ts +10 -0
  182. package/template-7.2.0-enterprise/packages/ss-boot/src/shim-vue.d.ts +6 -0
  183. package/template-7.2.0-enterprise/packages/ss-boot/tsconfig.json +27 -0
  184. package/template-7.2.0-enterprise/packages/ss-boot/vue.config.js +87 -0
  185. package/template-7.2.0-enterprise/packages/ss-oinone/index.ts +1 -0
  186. package/template-7.2.0-enterprise/packages/ss-oinone/package.json +30 -0
  187. package/template-7.2.0-enterprise/packages/ss-oinone/rollup.config.js +12 -0
  188. package/template-7.2.0-enterprise/packages/ss-oinone/scripts/postpublish.js +13 -0
  189. package/template-7.2.0-enterprise/packages/ss-oinone/scripts/prepublish-only.js +24 -0
  190. package/template-7.2.0-enterprise/packages/ss-oinone/src/index.ts +1 -0
  191. package/template-7.2.0-enterprise/packages/ss-oinone/src/shim-translate.d.ts +10 -0
  192. package/template-7.2.0-enterprise/packages/ss-oinone/src/shim-vue.d.ts +6 -0
  193. package/template-7.2.0-enterprise/packages/ss-oinone/tsconfig.json +14 -0
  194. package/template-7.2.0-enterprise/packages/ss-project/index.ts +1 -0
  195. package/template-7.2.0-enterprise/packages/ss-project/package.json +30 -0
  196. package/template-7.2.0-enterprise/packages/ss-project/rollup.config.js +12 -0
  197. package/template-7.2.0-enterprise/packages/ss-project/scripts/postpublish.js +13 -0
  198. package/template-7.2.0-enterprise/packages/ss-project/scripts/prepublish-only.js +24 -0
  199. package/template-7.2.0-enterprise/packages/ss-project/src/index.ts +1 -0
  200. package/template-7.2.0-enterprise/packages/ss-project/src/shim-translate.d.ts +10 -0
  201. package/template-7.2.0-enterprise/packages/ss-project/src/shim-vue.d.ts +6 -0
  202. package/template-7.2.0-enterprise/packages/ss-project/tsconfig.json +14 -0
  203. package/template-7.2.0-enterprise/pnpm-workspace.yaml +3 -0
  204. package/template-7.2.0-enterprise/scripts/build/inset-tsconfig.js +68 -0
  205. package/template-7.2.0-enterprise/scripts/build/package-name.js +25 -0
  206. 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,10 @@
1
+ export {};
2
+
3
+ declare module 'vue' {
4
+ interface ComponentCustomProperties {
5
+ $translate<T extends string | null | undefined = string | null | undefined>(
6
+ text: T,
7
+ context?: Record<string, unknown>
8
+ ): T;
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ declare module '*.vue' {
2
+ import { defineComponent } from 'vue';
3
+
4
+ const Component: ReturnType<typeof defineComponent>;
5
+ export default Component;
6
+ }
@@ -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,10 @@
1
+ export {};
2
+
3
+ declare module 'vue' {
4
+ interface ComponentCustomProperties {
5
+ $translate<T extends string | null | undefined = string | null | undefined>(
6
+ text: T,
7
+ context?: Record<string, unknown>
8
+ ): T;
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ declare module '*.vue' {
2
+ import { defineComponent } from 'vue';
3
+
4
+ const Component: ReturnType<typeof defineComponent>;
5
+ export default Component;
6
+ }
@@ -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,10 @@
1
+ export {};
2
+
3
+ declare module 'vue' {
4
+ interface ComponentCustomProperties {
5
+ $translate<T extends string | null | undefined = string | null | undefined>(
6
+ text: T,
7
+ context?: Record<string, unknown>
8
+ ): T;
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ declare module '*.vue' {
2
+ import { defineComponent } from 'vue';
3
+
4
+ const Component: ReturnType<typeof defineComponent>;
5
+ export default Component;
6
+ }
@@ -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,3 @@
1
+ packages:
2
+ - 'packages/*'
3
+