@modern-js/ssg-generator 3.4.16 → 3.4.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/dist/index.js +101 -101
  2. package/package.json +8 -8
  3. package/src/index.ts +5 -5
package/dist/index.js CHANGED
@@ -61719,10 +61719,6 @@ var AppAPI = class {
61719
61719
  }
61720
61720
  };
61721
61721
 
61722
- // ../../generator-utils/dist/esm/index.js
61723
- var import_path6 = __toESM(require("path"));
61724
- var import_utils16 = require("@modern-js/utils");
61725
-
61726
61722
  // ../../../cli/plugin-i18n/dist/esm-node/index.js
61727
61723
  var import_lodash7 = require("@modern-js/utils/lodash");
61728
61724
 
@@ -61786,98 +61782,6 @@ var I18n2 = class {
61786
61782
  }
61787
61783
  };
61788
61784
 
61789
- // ../../generator-common/dist/esm-node/locale/zh.js
61790
- var ZH_LOCALE2 = {
61791
- solution: {
61792
- self: "请选择你想创建的工程类型",
61793
- mwa: "Web 应用",
61794
- module: "Npm 模块",
61795
- custom: "自定义",
61796
- default: "默认"
61797
- },
61798
- scenes: {
61799
- self: "请选择项目场景"
61800
- },
61801
- sub_solution: {
61802
- self: "请选择你想创建的工程类型",
61803
- mwa: "Web 应用",
61804
- module: "Npm 模块"
61805
- },
61806
- action: {
61807
- self: "请选择你想要的操作",
61808
- function: {
61809
- self: "启用可选功能",
61810
- question: "请选择功能名称",
61811
- tailwindcss: "启用「Tailwind CSS」 支持",
61812
- bff: "启用「BFF」功能",
61813
- micro_frontend: "启用「微前端」模式",
61814
- i18n: "启用「国际化(i18n)」功能",
61815
- storybookV7: "启用「Storybook」V7",
61816
- runtime_api: "启用「Runtime API」",
61817
- ssg: "启用「SSG」功能",
61818
- polyfill: "启用「基于 UA 的 Polyfill」功能",
61819
- proxy: "启用「全局代理」",
61820
- swc: "启用「SWC 编译」",
61821
- module_doc: "启动「模块文档」功能"
61822
- },
61823
- element: {
61824
- self: "创建工程元素",
61825
- question: "请选择创建元素类型",
61826
- entry: "新建「应用入口」",
61827
- server: "新建「自定义 Web Server」源码目录"
61828
- },
61829
- refactor: {
61830
- self: "自动重构",
61831
- question: "请选择重构类型",
61832
- react_router_5: "使用 React Router v5"
61833
- }
61834
- },
61835
- boolean: {
61836
- yes: "是",
61837
- no: "否"
61838
- },
61839
- language: {
61840
- self: "请选择开发语言"
61841
- },
61842
- packageManager: {
61843
- self: "请选择包管理工具"
61844
- },
61845
- entry: {
61846
- name: "请填写入口名称",
61847
- no_empty: "入口名称不能为空!",
61848
- no_pages: '入口名称不支持 "pages"!'
61849
- },
61850
- packageName: {
61851
- self: "请填写项目名称",
61852
- sub_name: "请填写子项目名称",
61853
- no_empty: "项目名称不能为空!"
61854
- },
61855
- packagePath: {
61856
- self: "请填写子项目目录名称",
61857
- no_empty: "目录名称不能为空!",
61858
- format: "目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)"
61859
- },
61860
- framework: {
61861
- self: "请选择运行时框架",
61862
- egg: "Egg",
61863
- express: "Express",
61864
- koa: "Koa",
61865
- nest: "Nest"
61866
- },
61867
- bff: {
61868
- bffType: {
61869
- self: "请选择 BFF 类型",
61870
- func: "函数模式",
61871
- framework: "框架模式"
61872
- }
61873
- },
61874
- buildTools: {
61875
- self: "请选择构建工具",
61876
- webpack: "webpack",
61877
- rspack: "Rspack (实验性)"
61878
- }
61879
- };
61880
-
61881
61785
  // ../../generator-common/dist/esm-node/locale/en.js
61882
61786
  var EN_LOCALE2 = {
61883
61787
  solution: {
@@ -61970,6 +61874,98 @@ var EN_LOCALE2 = {
61970
61874
  }
61971
61875
  };
61972
61876
 
61877
+ // ../../generator-common/dist/esm-node/locale/zh.js
61878
+ var ZH_LOCALE2 = {
61879
+ solution: {
61880
+ self: "请选择你想创建的工程类型",
61881
+ mwa: "Web 应用",
61882
+ module: "Npm 模块",
61883
+ custom: "自定义",
61884
+ default: "默认"
61885
+ },
61886
+ scenes: {
61887
+ self: "请选择项目场景"
61888
+ },
61889
+ sub_solution: {
61890
+ self: "请选择你想创建的工程类型",
61891
+ mwa: "Web 应用",
61892
+ module: "Npm 模块"
61893
+ },
61894
+ action: {
61895
+ self: "请选择你想要的操作",
61896
+ function: {
61897
+ self: "启用可选功能",
61898
+ question: "请选择功能名称",
61899
+ tailwindcss: "启用「Tailwind CSS」 支持",
61900
+ bff: "启用「BFF」功能",
61901
+ micro_frontend: "启用「微前端」模式",
61902
+ i18n: "启用「国际化(i18n)」功能",
61903
+ storybookV7: "启用「Storybook」V7",
61904
+ runtime_api: "启用「Runtime API」",
61905
+ ssg: "启用「SSG」功能",
61906
+ polyfill: "启用「基于 UA 的 Polyfill」功能",
61907
+ proxy: "启用「全局代理」",
61908
+ swc: "启用「SWC 编译」",
61909
+ module_doc: "启动「模块文档」功能"
61910
+ },
61911
+ element: {
61912
+ self: "创建工程元素",
61913
+ question: "请选择创建元素类型",
61914
+ entry: "新建「应用入口」",
61915
+ server: "新建「自定义 Web Server」源码目录"
61916
+ },
61917
+ refactor: {
61918
+ self: "自动重构",
61919
+ question: "请选择重构类型",
61920
+ react_router_5: "使用 React Router v5"
61921
+ }
61922
+ },
61923
+ boolean: {
61924
+ yes: "是",
61925
+ no: "否"
61926
+ },
61927
+ language: {
61928
+ self: "请选择开发语言"
61929
+ },
61930
+ packageManager: {
61931
+ self: "请选择包管理工具"
61932
+ },
61933
+ entry: {
61934
+ name: "请填写入口名称",
61935
+ no_empty: "入口名称不能为空!",
61936
+ no_pages: '入口名称不支持 "pages"!'
61937
+ },
61938
+ packageName: {
61939
+ self: "请填写项目名称",
61940
+ sub_name: "请填写子项目名称",
61941
+ no_empty: "项目名称不能为空!"
61942
+ },
61943
+ packagePath: {
61944
+ self: "请填写子项目目录名称",
61945
+ no_empty: "目录名称不能为空!",
61946
+ format: "目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)"
61947
+ },
61948
+ framework: {
61949
+ self: "请选择运行时框架",
61950
+ egg: "Egg",
61951
+ express: "Express",
61952
+ koa: "Koa",
61953
+ nest: "Nest"
61954
+ },
61955
+ bff: {
61956
+ bffType: {
61957
+ self: "请选择 BFF 类型",
61958
+ func: "函数模式",
61959
+ framework: "框架模式"
61960
+ }
61961
+ },
61962
+ buildTools: {
61963
+ self: "请选择构建工具",
61964
+ webpack: "webpack",
61965
+ rspack: "Rspack (实验性)"
61966
+ }
61967
+ };
61968
+
61973
61969
  // ../../generator-common/dist/esm-node/locale/index.js
61974
61970
  var i18n2 = new I18n2();
61975
61971
  var localeKeys2 = i18n2.init("en", {
@@ -61985,6 +61981,10 @@ var Solution;
61985
61981
  })(Solution || (Solution = {}));
61986
61982
  var DependenceGenerator = "@modern-js/dependence-generator";
61987
61983
 
61984
+ // ../../generator-utils/dist/esm/index.js
61985
+ var import_path6 = __toESM(require("path"));
61986
+ var import_utils16 = require("@modern-js/utils");
61987
+
61988
61988
  // ../../generator-utils/dist/esm/utils/fsExist.js
61989
61989
  var import_utils15 = require("@modern-js/utils");
61990
61990
  async function fileExist(filePath) {
@@ -62031,16 +62031,16 @@ async function getModernConfigFile(appDir) {
62031
62031
  return isTsProject(appDir) ? "modern.config.ts" : "modern.config.js";
62032
62032
  }
62033
62033
 
62034
- // src/locale/zh.ts
62035
- var ZH_LOCALE3 = {
62036
- success: `安装插件依赖成功!请添加如下代码至`
62037
- };
62038
-
62039
62034
  // src/locale/en.ts
62040
62035
  var EN_LOCALE3 = {
62041
62036
  success: `Plugin dependency installed successfully! Please add the following code to`
62042
62037
  };
62043
62038
 
62039
+ // src/locale/zh.ts
62040
+ var ZH_LOCALE3 = {
62041
+ success: `安装插件依赖成功!请添加如下代码至`
62042
+ };
62043
+
62044
62044
  // src/locale/index.ts
62045
62045
  var i18n3 = new I18n2();
62046
62046
  var localeKeys3 = i18n3.init("en", { zh: ZH_LOCALE3, en: EN_LOCALE3 });
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.4.16",
18
+ "version": "3.4.17",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -23,7 +23,7 @@
23
23
  "/dist/index.js"
24
24
  ],
25
25
  "dependencies": {
26
- "@modern-js/utils": "2.58.2"
26
+ "@modern-js/utils": "2.58.3"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@modern-js/codesmith": "2.4.1",
@@ -32,12 +32,12 @@
32
32
  "@types/node": "^14",
33
33
  "jest": "^29",
34
34
  "typescript": "^5",
35
- "@modern-js/dependence-generator": "3.4.16",
36
- "@modern-js/generator-common": "3.4.16",
37
- "@modern-js/generator-utils": "3.4.16",
38
- "@modern-js/plugin-i18n": "2.58.2",
39
- "@scripts/build": "2.58.2",
40
- "@scripts/jest-config": "2.58.2"
35
+ "@modern-js/dependence-generator": "3.4.17",
36
+ "@modern-js/generator-utils": "3.4.17",
37
+ "@modern-js/generator-common": "3.4.17",
38
+ "@modern-js/plugin-i18n": "2.58.3",
39
+ "@scripts/jest-config": "2.58.3",
40
+ "@scripts/build": "2.58.3"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "publishConfig": {
package/src/index.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  import type { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
2
2
  import { AppAPI } from '@modern-js/codesmith-api-app';
3
- import {
4
- chalk,
5
- getModernConfigFile,
6
- getGeneratorPath,
7
- } from '@modern-js/generator-utils';
8
3
  import {
9
4
  DependenceGenerator,
10
5
  i18n as commonI18n,
11
6
  } from '@modern-js/generator-common';
7
+ import {
8
+ chalk,
9
+ getGeneratorPath,
10
+ getModernConfigFile,
11
+ } from '@modern-js/generator-utils';
12
12
  import { i18n, localeKeys } from './locale';
13
13
 
14
14
  const handleTemplateFile = async (