create-vuepress-theme-plume 1.0.0-rc.162 → 1.0.0-rc.164

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/lib/index.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export { };
package/lib/index.js CHANGED
@@ -13,7 +13,7 @@ import handlebars from "handlebars";
13
13
  import { osLocale } from "os-locale";
14
14
 
15
15
  //#region package.json
16
- var version = "1.0.0-rc.161";
16
+ var version = "1.0.0-rc.163";
17
17
 
18
18
  //#endregion
19
19
  //#region src/constants.ts
@@ -96,8 +96,7 @@ async function readJsonFile(filepath) {
96
96
  //#endregion
97
97
  //#region src/utils/getPackageManager.ts
98
98
  function getPackageManager() {
99
- const name = process.env?.npm_config_user_agent || "npm";
100
- return name.split("/")[0];
99
+ return (process.env?.npm_config_user_agent || "npm").split("/")[0];
101
100
  }
102
101
 
103
102
  //#endregion
@@ -217,8 +216,7 @@ function createRender(result) {
217
216
  };
218
217
  return function render(source) {
219
218
  try {
220
- const template = handlebars.compile(source);
221
- return template(data);
219
+ return handlebars.compile(source)(data);
222
220
  } catch (e) {
223
221
  console.error(e);
224
222
  return source;
@@ -389,7 +387,7 @@ async function prompt(mode, root) {
389
387
  if (mode === Mode.init) try {
390
388
  hasTs = !!require.resolve("typescript");
391
389
  } catch {}
392
- const result = await group({
390
+ return await group({
393
391
  displayLang: async () => {
394
392
  const locale = await osLocale();
395
393
  if (locale === "zh-CN" || locale === "zh-Hans") {
@@ -416,7 +414,6 @@ async function prompt(mode, root) {
416
414
  validate(value) {
417
415
  if (value?.startsWith("/") || value?.startsWith("..")) return t("hint.root");
418
416
  if (value && REG_DIR_CHAR.test(value)) return t("hint.root.illegal");
419
- return void 0;
420
417
  },
421
418
  defaultValue: DEFAULT_ROOT
422
419
  });
@@ -477,7 +474,6 @@ async function prompt(mode, root) {
477
474
  cancel(t("hint.cancel"));
478
475
  process.exit(0);
479
476
  } });
480
- return result;
481
477
  }
482
478
 
483
479
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-vuepress-theme-plume",
3
3
  "type": "module",
4
- "version": "1.0.0-rc.162",
4
+ "version": "1.0.0-rc.164",
5
5
  "description": "The cli for create vuepress-theme-plume's project",
6
6
  "author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo/)",
7
7
  "license": "MIT",
@@ -31,13 +31,13 @@
31
31
  "@pengzhanbo/utils": "^2.1.0",
32
32
  "cac": "^6.7.14",
33
33
  "handlebars": "^4.7.8",
34
- "nano-spawn": "^1.0.2",
34
+ "nano-spawn": "^1.0.3",
35
35
  "os-locale": "^6.0.2",
36
36
  "picocolors": "^1.1.1"
37
37
  },
38
38
  "plume-deps": {
39
39
  "vuepress": "2.0.0-rc.24",
40
- "vue": "^3.5.18",
40
+ "vue": "^3.5.21",
41
41
  "http-server": "^14.1.1",
42
42
  "typescript": "^5.9.2"
43
43
  },