ol-base-components 2.3.0 → 2.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol-base-components",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "bin": {
@@ -15,6 +15,7 @@
15
15
  "init": "node src/bin/init.js"
16
16
  },
17
17
  "dependencies": {
18
+ "commander": "^14.0.0",
18
19
  "core-js": "^3.8.3",
19
20
  "element-ui": "^2.15.14",
20
21
  "eslint": "^8.57.1",
package/src/bin/init.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  const { Command } = require("commander");
2
3
  const fs = require("fs");
3
4
  const path = require("path");
@@ -14,8 +15,7 @@ program
14
15
  fs.mkdirSync(dir);
15
16
  console.log(`创建文件夹: ${dir}`);
16
17
  const templateContent = vue2Template(moduleName);
17
- fs.writeFileSync(path.join(dir, `${moduleName}.vue`), templateContent);
18
- console.log(`创建文件: ${moduleName}.vue`);
18
+ fs.writeFileSync(path.join(dir, `index.vue`), templateContent);
19
19
  } else {
20
20
  console.log(`创建失败,文件夹 ${dir} 已存在`);
21
21
  }
@@ -30,7 +30,7 @@ const vue2Template = (moduleName) => {
30
30
  import { getAdmissioninfoPagedresult } from "@/api/modules";
31
31
  import { AdmissionInfo } from '@/api/swagger'
32
32
  export default {
33
- name: "test",
33
+ name: "${moduleName}",
34
34
  data() {
35
35
  return {
36
36
  swaggerUrl: AdmissionInfo,