@maxelms/create-plugin-cli 1.1.5 → 1.1.7

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 (47) hide show
  1. package/bin/index.js +1 -0
  2. package/lib/index.js +1 -1
  3. package/lib/utils.d.ts +1 -0
  4. package/package.json +2 -2
  5. package/templates/maxelms-script/index.html +1 -1
  6. package/templates/maxelms-style/package.json.tpl +1 -1
  7. package/templates/react-micro-app/src/pages/Home/index.tsx +2 -2
  8. package/templates/react-micro-field/src/App.tsx.tpl +1 -1
  9. package/templates/react-micro-field-umi/src/pages/index.tsx.tpl +1 -1
  10. package/templates/react-micro-plugin/src/App.tsx.tpl +1 -1
  11. package/templates/vue-micro-app/src/main.js +1 -1
  12. package/templates/vue-micro-button/src/App.vue +2 -2
  13. package/templates/vue3-micro-app/.editorconfig +6 -0
  14. package/templates/vue3-micro-app/.prettierrc.json +7 -0
  15. package/templates/vue3-micro-app/.vscode/extensions.json +9 -0
  16. package/templates/vue3-micro-app/README.md +45 -0
  17. package/templates/vue3-micro-app/env.d.ts +1 -0
  18. package/templates/vue3-micro-app/eslint.config.js +25 -0
  19. package/templates/vue3-micro-app/index.html +13 -0
  20. package/templates/vue3-micro-app/package.json.tpl +46 -0
  21. package/templates/vue3-micro-app/pnpm-lock.yaml +4477 -0
  22. package/templates/vue3-micro-app/public/configuration.json +30 -0
  23. package/templates/vue3-micro-app/public/favicon.ico +0 -0
  24. package/templates/vue3-micro-app/src/App.vue +88 -0
  25. package/templates/vue3-micro-app/src/assets/base.css +86 -0
  26. package/templates/vue3-micro-app/src/assets/logo.svg +1 -0
  27. package/templates/vue3-micro-app/src/assets/main.css +35 -0
  28. package/templates/vue3-micro-app/src/components/HelloWorld.vue +42 -0
  29. package/templates/vue3-micro-app/src/components/TheWelcome.vue +90 -0
  30. package/templates/vue3-micro-app/src/components/WelcomeItem.vue +87 -0
  31. package/templates/vue3-micro-app/src/components/__tests__/HelloWorld.spec.ts +11 -0
  32. package/templates/vue3-micro-app/src/components/icons/IconCommunity.vue +7 -0
  33. package/templates/vue3-micro-app/src/components/icons/IconDocumentation.vue +7 -0
  34. package/templates/vue3-micro-app/src/components/icons/IconEcosystem.vue +7 -0
  35. package/templates/vue3-micro-app/src/components/icons/IconSupport.vue +7 -0
  36. package/templates/vue3-micro-app/src/components/icons/IconTooling.vue +19 -0
  37. package/templates/vue3-micro-app/src/main.ts +14 -0
  38. package/templates/vue3-micro-app/src/router/index.ts +23 -0
  39. package/templates/vue3-micro-app/src/stores/counter.ts +12 -0
  40. package/templates/vue3-micro-app/src/views/AboutView.vue +15 -0
  41. package/templates/vue3-micro-app/src/views/HomeView.vue +9 -0
  42. package/templates/vue3-micro-app/tsconfig.app.json +13 -0
  43. package/templates/vue3-micro-app/tsconfig.json +14 -0
  44. package/templates/vue3-micro-app/tsconfig.node.json +19 -0
  45. package/templates/vue3-micro-app/tsconfig.vitest.json +11 -0
  46. package/templates/vue3-micro-app/vite.config.ts +24 -0
  47. package/templates/vue3-micro-app/vitest.config.ts +14 -0
package/bin/index.js CHANGED
@@ -20,6 +20,7 @@ program
20
20
  `请选择前端框架`,
21
21
  'react',
22
22
  'vue',
23
+ 'vue3',
23
24
  ].join('\n'))
24
25
  .option('-c, --PROJECT_CONFIG_TYPE <PROJECT_CONFIG_TYPE>', [
25
26
  `请选择配置类型`,
package/lib/index.js CHANGED
@@ -48,7 +48,7 @@ var uuid_1 = require("uuid");
48
48
  var utils_1 = require("./utils");
49
49
  var pkg = require('../package.json');
50
50
  var cliVersion = pkg.version;
51
- var frameworks = ['react', 'vue'];
51
+ var frameworks = ['react', 'vue', 'vue3'];
52
52
  var jQuery = 'jQuery';
53
53
  var templates = ['umi'];
54
54
  /** 项目类型 */
package/lib/utils.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  export declare function normalizeFilePaths(files: {
3
4
  [prop: string]: string | Buffer;
4
5
  }): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxelms/create-plugin-cli",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "main": "./bin/index.js",
5
5
  "author": "jackc_001",
6
6
  "bin": {
@@ -47,4 +47,4 @@
47
47
  "typescript": "4.7.3"
48
48
  },
49
49
  "gitHead": "d034472e8762a7b6ff01bafec131911ded8b2d51"
50
- }
50
+ }
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <title>欢迎使用 Maxelms APaaS 扩展脚本</title>
5
+ <title>欢迎使用 Maxelms 扩展脚本</title>
6
6
  </head>
7
7
  <body>
8
8
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "<%= pluginName %>",
3
3
  "version": "1.0.0",
4
- "description": "Maxelms APaaS 自定义主题样式模版",
4
+ "description": "Maxelms 自定义主题样式模版",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "start": "serve -p 8703 & watchlessc -p 8799"
@@ -5,9 +5,9 @@ import styles from './index.less'
5
5
 
6
6
 
7
7
  const Home = () => {
8
- /** APaaS 平台传递给微应用的状态数据 */
8
+ /** 平台传递给微应用的状态数据 */
9
9
  const props = React.useContext(MasterContext)
10
- /** 当组件运行在 APaaS 基座应用时才存在 props 属性 */
10
+ /** 当组件运行在 系统应用时才存在 props 属性 */
11
11
  const { configurations } = props || {}
12
12
  /** configurations 是组件的配置项信息 */
13
13
  const {
@@ -5,7 +5,7 @@ import './style.less';
5
5
  const prefixCls = 'maxelms-customize-component-<%= timestamp %>'
6
6
 
7
7
  const App = (props: any) => {
8
- /** 当组件运行在 APaaS 基座应用时才存在 props 属性 */
8
+ /** 当组件运行在 系统应用时才存在 props 属性 */
9
9
  const { configurations, value, onChange, readOnly } = props
10
10
  /** configurations 是组件的配置项信息 */
11
11
  const {
@@ -8,7 +8,7 @@ const prefixCls = 'maxelms-customize-component-<%= timestamp %>'
8
8
 
9
9
  const App = (props: any) => {
10
10
  const masterProps = useMasterProps();
11
- /** 当组件运行在 APaaS 基座应用时才存在 props 属性 */
11
+ /** 当组件运行在 系统应用时才存在 props 属性 */
12
12
  const { configurations, value, onChange, readOnly } = masterProps
13
13
  /** configurations 是组件的配置项信息 */
14
14
  const {
@@ -5,7 +5,7 @@ import './style.less';
5
5
  const prefixCls = 'maxelms-customize-component-<%= timestamp %>'
6
6
 
7
7
  const App = (props: any) => {
8
- /** 当组件运行在 APaaS 基座应用时才存在 props 属性 */
8
+ /** 当组件运行在 系统应用时才存在 props 属性 */
9
9
  /** configurations 是组件的配置项信息 */
10
10
  const { configurations } = props
11
11
  const {
@@ -51,7 +51,7 @@ if (!window.__POWERED_BY_QIANKUN__) {
51
51
  }
52
52
 
53
53
  /**
54
- * 以下生命周期将会在 apaas 基座环境中被调用
54
+ * 以下生命周期将会在 系统环境中被调用
55
55
  * 是基座应用与微应用通信的桥梁
56
56
  * 开发者可以根据业务需求在不同的生命周期中编写业务代码
57
57
  */
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div id="app">
3
- <!-- 集成在 apaas 中时会走该逻辑 -->
3
+ <!-- 集成在 系统 中时会走该逻辑 -->
4
4
  <span v-if="buttonName" @click="visible = true">{{buttonName}}</span>
5
- <!-- 由于独立开发时没有 apaas 传递的上下文数据,会渲染一个按钮辅助开发 -->
5
+ <!-- 由于独立开发时没有 系统 传递的上下文数据,会渲染一个按钮辅助开发 -->
6
6
  <button v-if="!buttonName" @click="visible = true">自定义按钮</button>
7
7
  <el-dialog
8
8
  append-to-body
@@ -0,0 +1,6 @@
1
+ [*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
2
+ charset = utf-8
3
+ indent_size = 2
4
+ indent_style = space
5
+ insert_final_newline = true
6
+ trim_trailing_whitespace = true
@@ -0,0 +1,7 @@
1
+
2
+ {
3
+ "$schema": "https://json.schemastore.org/prettierrc",
4
+ "semi": false,
5
+ "singleQuote": true,
6
+ "printWidth": 100
7
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "recommendations": [
3
+ "Vue.volar",
4
+ "vitest.explorer",
5
+ "dbaeumer.vscode-eslint",
6
+ "EditorConfig.EditorConfig",
7
+ "esbenp.prettier-vscode"
8
+ ]
9
+ }
@@ -0,0 +1,45 @@
1
+ # vue-project
2
+
3
+ This template should help get you started developing with Vue 3 in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8
+
9
+ ## Type Support for `.vue` Imports in TS
10
+
11
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
12
+
13
+ ## Customize configuration
14
+
15
+ See [Vite Configuration Reference](https://vite.dev/config/).
16
+
17
+ ## Project Setup
18
+
19
+ ```sh
20
+ pnpm install
21
+ ```
22
+
23
+ ### Compile and Hot-Reload for Development
24
+
25
+ ```sh
26
+ pnpm dev
27
+ ```
28
+
29
+ ### Type-Check, Compile and Minify for Production
30
+
31
+ ```sh
32
+ pnpm build
33
+ ```
34
+
35
+ ### Run Unit Tests with [Vitest](https://vitest.dev/)
36
+
37
+ ```sh
38
+ pnpm test:unit
39
+ ```
40
+
41
+ ### Lint with [ESLint](https://eslint.org/)
42
+
43
+ ```sh
44
+ pnpm lint
45
+ ```
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,25 @@
1
+ import pluginVue from 'eslint-plugin-vue'
2
+ import vueTsEslintConfig from '@vue/eslint-config-typescript'
3
+ import pluginVitest from '@vitest/eslint-plugin'
4
+ import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
5
+
6
+ export default [
7
+ {
8
+ name: 'app/files-to-lint',
9
+ files: ['**/*.{ts,mts,tsx,vue}'],
10
+ },
11
+
12
+ {
13
+ name: 'app/files-to-ignore',
14
+ ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
15
+ },
16
+
17
+ ...pluginVue.configs['flat/essential'],
18
+ ...vueTsEslintConfig(),
19
+
20
+ {
21
+ ...pluginVitest.configs.recommended,
22
+ files: ['src/**/__tests__/*'],
23
+ },
24
+ skipFormatting,
25
+ ]
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Maxelms MicroApp</title>
8
+ </head>
9
+ <body>
10
+ <div id="micro-app" style="height: 100%"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "<%= pluginName %>",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "start": "vite",
8
+ "build": "run-p type-check \"build-only {@}\" -- && maxelms-plugin-cli -c",
9
+ "preview": "vite preview",
10
+ "test:unit": "vitest",
11
+ "build-only": "vite build",
12
+ "type-check": "vue-tsc --build",
13
+ "lint": "eslint . --fix",
14
+ "format": "prettier --write src/"
15
+ },
16
+ "dependencies": {
17
+ "@esbuild/darwin-arm64": "0.24.0",
18
+ "@rollup/rollup-darwin-arm64": "4.28.1",
19
+ "pinia": "2.2.6",
20
+ "vue": "3.5.13",
21
+ "vue-router": "4.4.5"
22
+ },
23
+ "devDependencies": {
24
+ "@maxelms/create-plugin-cli": "<%= cliVersion %>",
25
+ "@tsconfig/node22": "22.0.0",
26
+ "@types/jsdom": "21.1.7",
27
+ "@types/node": "22.9.3",
28
+ "@vitejs/plugin-vue": "5.2.1",
29
+ "@vitejs/plugin-vue-jsx": "4.1.1",
30
+ "@vitest/eslint-plugin": "1.1.10",
31
+ "@vue/eslint-config-prettier": "10.1.0",
32
+ "@vue/eslint-config-typescript": "14.1.3",
33
+ "@vue/test-utils": "2.4.6",
34
+ "@vue/tsconfig": "0.7.0",
35
+ "eslint": "9.14.0",
36
+ "eslint-plugin-vue": "9.30.0",
37
+ "jsdom": "25.0.1",
38
+ "npm-run-all2": "7.0.1",
39
+ "prettier": "3.3.3",
40
+ "typescript": "~5.6.3",
41
+ "vite": "6.0.1",
42
+ "vite-plugin-vue-devtools": "7.6.5",
43
+ "vitest": "2.1.5",
44
+ "vue-tsc": "2.1.10"
45
+ }
46
+ }