create-nocdn-app 0.0.10 → 0.0.11

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/index.js CHANGED
@@ -18,6 +18,7 @@ const flags = {
18
18
  open: args.includes("--open"),
19
19
  useNpm: args.includes("--use-npm"),
20
20
  usePnpm: args.includes("--use-pnpm"),
21
+ testing: args.includes("--testing"),
21
22
  };
22
23
 
23
24
  const cliProjectName = args.find((arg) => !arg.startsWith("-"));
@@ -38,6 +39,7 @@ Options:
38
39
  --open Open project in default editor after creation
39
40
  --use-npm Use npm instead of bun for installing dependencies
40
41
  --use-pnpm Use pnpm instead of bun for installing dependencies
42
+ --testing Use local template instead of cloning from GitHub (for development)
41
43
 
42
44
  Examples:
43
45
  bunx create-nocdn-app Interactive mode
@@ -119,16 +121,21 @@ async function main() {
119
121
  process.exit(1);
120
122
  } catch {}
121
123
 
122
- s.start("Cloning template...");
123
- const tempPath = path.join(process.cwd(), `.temp-${Date.now()}`);
124
- await execAsync(
125
- `git clone --depth 1 https://github.com/nocdn/create-nocdn-app.git "${tempPath}"`,
126
- );
127
-
128
- await fs.rename(path.join(tempPath, "template"), projectPath);
129
-
130
- await fs.rm(tempPath, { recursive: true, force: true });
131
- s.stop("Template cloned");
124
+ s.start(flags.testing ? "Copying local template..." : "Cloning template...");
125
+ if (flags.testing) {
126
+ const scriptDir = new URL(".", import.meta.url).pathname;
127
+ const localTemplatePath = path.join(scriptDir, "template");
128
+ await fs.cp(localTemplatePath, projectPath, { recursive: true });
129
+ s.stop("Local template copied");
130
+ } else {
131
+ const tempPath = path.join(process.cwd(), `.temp-${Date.now()}`);
132
+ await execAsync(
133
+ `git clone --depth 1 https://github.com/nocdn/create-nocdn-app.git "${tempPath}"`,
134
+ );
135
+ await fs.rename(path.join(tempPath, "template"), projectPath);
136
+ await fs.rm(tempPath, { recursive: true, force: true });
137
+ s.stop("Template cloned");
138
+ }
132
139
 
133
140
  s.start("Configuring project...");
134
141
  const packageJsonPath = path.join(projectPath, "package.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nocdn-app",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Scaffold Next.js my preferred way",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,6 +29,8 @@ const ioskeleyMono = localFont({
29
29
  { path: "./fonts/IoskeleyMono-Regular.woff2", weight: "400" },
30
30
  { path: "./fonts/IoskeleyMono-Medium.woff2", weight: "500" },
31
31
  { path: "./fonts/IoskeleyMono-SemiBold.woff2", weight: "600" },
32
+ { path: "./fonts/IoskeleyMono-Bold.woff2", weight: "700" },
33
+ { path: "./fonts/IoskeleyMono-ExtraBold.woff2", weight: "800" },
32
34
  ],
33
35
  variable: "--font-ioskeley-mono",
34
36
  });