create-weapp-vite 2.0.0 → 2.0.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.
@@ -5,10 +5,10 @@ import fs2 from "fs-extra";
5
5
  import path2 from "pathe";
6
6
 
7
7
  // ../weapp-vite/package.json
8
- var version = "6.2.0";
8
+ var version = "6.2.1";
9
9
 
10
10
  // ../wevu/package.json
11
- var version2 = "1.1.0";
11
+ var version2 = "1.1.1";
12
12
 
13
13
  // src/enums.ts
14
14
  var TemplateName = /* @__PURE__ */ ((TemplateName2) => {
@@ -249,6 +249,9 @@ function upsertExistingDependencyVersion(pkgJson, packageName, resolvedVersion)
249
249
  pkgJson.devDependencies[packageName] = resolvedVersion;
250
250
  }
251
251
  }
252
+ function toCaretVersion(version3) {
253
+ return version3.startsWith("^") ? version3 : `^${version3}`;
254
+ }
252
255
  async function createProject(targetDir = "", templateName = "default" /* default */) {
253
256
  const targetTemplateDir = path2.resolve(moduleDir, "../templates", templateName);
254
257
  if (!await fs2.pathExists(targetTemplateDir)) {
@@ -263,8 +266,8 @@ async function createProject(targetDir = "", templateName = "default" /* default
263
266
  if (!pkgJson.devDependencies) {
264
267
  pkgJson.devDependencies = {};
265
268
  }
266
- upsertExistingDependencyVersion(pkgJson, "weapp-vite", version);
267
- upsertExistingDependencyVersion(pkgJson, "wevu", version2);
269
+ upsertExistingDependencyVersion(pkgJson, "weapp-vite", toCaretVersion(version));
270
+ upsertExistingDependencyVersion(pkgJson, "wevu", toCaretVersion(version2));
268
271
  await upsertTailwindcssVersion(pkgJson);
269
272
  await writeJsonFile(packageJsonPath, pkgJson);
270
273
  await updateGitIgnore({ root: targetDir, write: true });
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createProject
3
- } from "./chunk-BMBPYJ45.js";
3
+ } from "./chunk-BZ24ECIW.js";
4
4
 
5
5
  // src/cli.ts
6
6
  import path from "path";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TemplateName,
3
3
  createProject
4
- } from "./chunk-BMBPYJ45.js";
4
+ } from "./chunk-BZ24ECIW.js";
5
5
  export {
6
6
  TemplateName,
7
7
  createProject
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-weapp-vite",
3
3
  "type": "module",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "description": "create-weapp-vite",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",