create-tsdown 0.22.2 → 0.22.4

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/dist/index.d.mts CHANGED
@@ -31,14 +31,14 @@ interface Options {
31
31
  }
32
32
  type ResolvedOptions = Required<Options>;
33
33
  /**
34
- * Create a tsdown project.
35
- */
34
+ * Create a tsdown project.
35
+ */
36
36
  declare function create(path: string | undefined, options: Options): Promise<void>;
37
37
  /**
38
- * Resolve the user options and configs
39
- * @param options The user options
40
- * @returns The resolved options
41
- */
38
+ * Resolve the user options and configs
39
+ * @param options The user options
40
+ * @returns The resolved options
41
+ */
42
42
  declare function resolveOptions(options: Options): Promise<ResolvedOptions>;
43
43
  //#endregion
44
44
  export { Options, ResolvedOptions, create, resolveOptions, templateOptions };
package/dist/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { resolve } from "node:path";
1
2
  import process from "node:process";
2
3
  import { styleText } from "node:util";
3
4
  import { cancel, intro, isCancel, outro, select, spinner, text } from "@clack/prompts";
@@ -52,7 +53,7 @@ async function create(path, options) {
52
53
  await downloadTemplate(`gh:sxzz/tsdown-templates/${resolved.template}`, { dir: resolved.path });
53
54
  s.stop("Template cloned");
54
55
  const pm = getUserAgent() || "npm";
55
- outro(`Done! Now run:\n ${styleText("green", `cd ${resolved.path}`)}\n ${styleText("green", `${pm} install`)}\n ${styleText("green", `${pm} run build`)}\n\nFor more information, visit: ${styleText("underline", `https://tsdown.dev/`)}`);
56
+ outro(`Done! Now run:\n${resolve(resolved.path) === process.cwd() ? "" : ` ${styleText("green", `cd ${resolved.path}`)}\n`} ${styleText("green", `${pm} install`)}\n ${styleText("green", `${pm} run build`)}\n\nFor more information, visit: ${styleText("underline", `https://tsdown.dev/`)}`);
56
57
  }
57
58
  /**
58
59
  * Resolve the user options and configs
package/dist/run.mjs CHANGED
@@ -5,7 +5,7 @@ import { log } from "@clack/prompts";
5
5
  import { cac } from "cac";
6
6
  //#endregion
7
7
  //#region src/cli.ts
8
- const cli = cac("create-tsdown").version("0.22.2").help();
8
+ const cli = cac("create-tsdown").version("0.22.4").help();
9
9
  cli.command("[path]", "Create a tsdown project").option("-t, --template <template>", `Available templates: ${templateOptions.map((option) => option.value).join(", ")}`).action((path, options) => create(path, options));
10
10
  async function runCLI() {
11
11
  cli.parse(process.argv, { run: false });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-tsdown",
3
3
  "type": "module",
4
- "version": "0.22.2",
4
+ "version": "0.22.4",
5
5
  "description": "Create a new tsdown project",
6
6
  "author": "Kevin Deng <sxzz@sxzz.moe>",
7
7
  "license": "MIT",
@@ -39,13 +39,13 @@
39
39
  "access": "public"
40
40
  },
41
41
  "engines": {
42
- "node": "^22.18.0 || >=24.0.0"
42
+ "node": "^22.18.0 || >=24.11.0"
43
43
  },
44
44
  "dependencies": {
45
- "@clack/prompts": "^1.5.0",
45
+ "@clack/prompts": "^1.7.0",
46
46
  "cac": "^7.0.0",
47
- "giget": "^3.2.0",
48
- "package-manager-detector": "^1.6.0"
47
+ "giget": "^3.3.0",
48
+ "package-manager-detector": "^1.7.0"
49
49
  },
50
50
  "scripts": {
51
51
  "dev": "node ./src/run.ts",