create-komorebi 0.1.0 → 0.1.2

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/cli.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync } from "node:child_process";
3
- import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, } from "node:fs";
3
+ import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, renameSync, } from "node:fs";
4
4
  import { basename, dirname, join, relative, resolve } from "node:path";
5
5
  import process from "node:process";
6
6
  import { fileURLToPath } from "node:url";
7
7
  import pc from "picocolors";
8
8
  import prompts from "prompts";
9
9
  const TEMPLATE_TEXT_FILES = [
10
- ".gitignore",
10
+ "gitignore",
11
11
  "README.md",
12
12
  "package.json",
13
13
  "astro.config.ts",
@@ -16,6 +16,9 @@ const TEMPLATE_TEXT_FILES = [
16
16
  "src/content/about.md",
17
17
  "src/content/blog/hello-world.md",
18
18
  ];
19
+ const RENAME_MAP = {
20
+ "gitignore": ".gitignore",
21
+ };
19
22
  const ASCII_LOGO = [
20
23
  " _ __ _ _ ",
21
24
  " | |/ /___ _ __ ___ ___ _ __ ___| |__ (_)",
@@ -70,6 +73,11 @@ async function main() {
70
73
  const content = readFileSync(filePath, "utf-8");
71
74
  writeFileSync(filePath, applyReplacements(content, replacements), "utf-8");
72
75
  }
76
+ for (const [from, to] of Object.entries(RENAME_MAP)) {
77
+ const fromPath = join(targetDir, from);
78
+ const toPath = join(targetDir, to);
79
+ renameSync(fromPath, toPath);
80
+ }
73
81
  let installSucceeded = false;
74
82
  if (shouldInstall) {
75
83
  installSucceeded = installDependencies(targetDir, packageManager);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-komorebi",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-komorebi": "./dist/cli.js"
@@ -12,6 +12,7 @@
12
12
  "files": [
13
13
  "dist",
14
14
  "template",
15
+ "template/.gitignore",
15
16
  "README.md"
16
17
  ],
17
18
  "keywords": [
@@ -0,0 +1,4 @@
1
+ node_modules
2
+ .astro
3
+ dist
4
+ .DS_Store