@ibiz-template/full-code-template 0.7.41-alpha.7 → 0.7.41-alpha.8

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": "@ibiz-template/full-code-template",
3
- "version": "0.7.41-alpha.7",
3
+ "version": "0.7.41-alpha.8",
4
4
  "description": "vue3全代码模版包,根据包内容生成项目代码。",
5
5
  "bin": {
6
6
  "code-generator": "src/index.js"
package/src/index.js CHANGED
@@ -12,20 +12,24 @@ program
12
12
  .option('-m, --model <model-path>', '模型目录')
13
13
  .option('-o, --output <output-path>', '输出目录, 默认输出: 模板目录/out')
14
14
  .option('--app [app-code-name]', '发布模式改为应用, 模型目录将识别为应用')
15
+ .option('--local-mode', '是否为本地模式', false)
15
16
  .parse(process.argv);
16
17
 
17
- const { model, output, app } = program.opts();
18
+ const { model, output, app, localMode } = program.opts();
18
19
 
19
20
  const modelPath = path.resolve(model);
20
21
  const outputPath = path.resolve(output);
21
22
 
22
- copyFiles(staticPath, outputPath);
23
- console.log(`拷贝静态资源成功,静态资源路径:${staticPath},输出路径:${outputPath}`);
23
+ // 本地模式不拷贝静态资源和调整git忽略文件,仅基于模型发布代码
24
+ if (!localMode) {
25
+ copyFiles(staticPath, outputPath);
26
+ console.log(`拷贝静态资源成功,静态资源路径:${staticPath},输出路径:${outputPath}`);
24
27
 
25
- fs.renameSync(
26
- path.join(outputPath, '.gitignore.bak'),
27
- path.join(outputPath, '.gitignore'),
28
- );
28
+ fs.renameSync(
29
+ path.join(outputPath, '.gitignore.bak'),
30
+ path.join(outputPath, '.gitignore'),
31
+ );
32
+ }
29
33
 
30
34
  const binPath = path.resolve(path.join(__dirname, '../node_modules/.bin'));
31
35
 
package/static/README.md CHANGED
@@ -58,10 +58,10 @@ $ pnpm install
58
58
 
59
59
  ### 3. 发布代码
60
60
 
61
- 当模型更新后,通常需要发布代码查看最新效果,调整pub:code命令参数,其中m指的是模型路径,o指的是输出目录,app指的是应用名称,tv指的是模板版本,通常情况下我们只需调整模型路径即可。
61
+ 当模型更新后,通常需要发布代码查看最新效果,调整pub:code命令参数,其中m表示模型路径,o表示输出目录,app表示应用名称,tv表示模板版本,local-mode表示启用本地模式。
62
62
 
63
63
  ```bash
64
- # "pub:code": "generate -m /root/workspace/ibizlab-plm/model -o ./ --app plmweb -tv 0.7.41-alpha.7",
64
+ # "pub:code": "generate -m /root/workspace/ibizlab-plm/model -o ./ --app plmweb -tv 0.7.41-alpha.8 --local-mode",
65
65
  $ pnpm pub:code
66
66
  ```
67
67
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ibiz-template/full-code-template",
3
3
  "private": true,
4
- "version": "0.7.41-alpha.7",
4
+ "version": "0.7.41-alpha.8",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -10,7 +10,7 @@
10
10
  "lint": "eslint 'src/**/*.tsx' 'src/**/*.ts' 'src/**/*.vue'",
11
11
  "lint:style": "stylelint 'src/**/*.scss'",
12
12
  "pub:temp":"publish -p .",
13
- "pub:code": "generate -m /root/workspace/ibizlab-plm/model -o ./ --app plmweb -tv 0.7.41-alpha.7",
13
+ "pub:code": "generate -m /root/workspace/ibizlab-plm/model -o ./ --app plmweb -tv 0.7.41-alpha.8 --local-mode",
14
14
  "compute:pkg": "ibiz-temp compute-pkg -m /root/workspace/ibizlab-plm/model --app plmweb",
15
15
  "download:pkg": "ibiz-temp download-pkg",
16
16
  "prettier": "prettier --ignore-path '' 'src/publish/**/*.(ts|vue|tsx)' -w",
@@ -60,7 +60,7 @@
60
60
  "@commitlint/cli": "^17.8.0",
61
61
  "@commitlint/config-conventional": "^17.8.0",
62
62
  "@ibiz-template/cli": "^0.3.23",
63
- "@ibiz-template/full-code-generator": "^0.0.3",
63
+ "@ibiz-template/full-code-generator": "^0.0.4",
64
64
  "@ibizlab/cli": "^0.2.29",
65
65
  "@types/lodash-es": "^4.17.10",
66
66
  "@types/node": "^20.8.7",
@@ -131,8 +131,8 @@ devDependencies:
131
131
  specifier: ^0.3.23
132
132
  version: 0.3.23(@types/node@20.8.7)(postcss@8.4.31)(vue@3.3.8)
133
133
  '@ibiz-template/full-code-generator':
134
- specifier: ^0.0.3
135
- version: 0.0.3(@ibizlab/model@0.2.15)
134
+ specifier: ^0.0.4
135
+ version: 0.0.4(@ibizlab/model@0.2.15)
136
136
  '@ibizlab/cli':
137
137
  specifier: ^0.2.29
138
138
  version: 0.2.29(@ibizlab/model@0.2.15)
@@ -4044,8 +4044,8 @@ packages:
4044
4044
  vuedraggable: 4.1.0(vue@3.3.8)
4045
4045
  dev: false
4046
4046
 
4047
- /@ibiz-template/full-code-generator@0.0.3(@ibizlab/model@0.2.15):
4048
- resolution: {integrity: sha512-HCN8firGQZIdhNpe1EFVGpogifYEu/Wg4ctEkXxK0b0oDOv8SrRoZwbOcCUTjW+1RmqGtts1LvxqejhM+DpW4g==}
4047
+ /@ibiz-template/full-code-generator@0.0.4(@ibizlab/model@0.2.15):
4048
+ resolution: {integrity: sha512-GpnU3vWPsgrfAWGvCw9ic4TzewVdwMti9cS0xzKyCTbAhueCyzyRA/DpaHbotkMC9uYoDr5BK9AQ38JEnEprAg==}
4049
4049
  hasBin: true
4050
4050
  dependencies:
4051
4051
  '@ibizlab/cli': 0.2.29(@ibizlab/model@0.2.15)