create-rotor 0.3.0 → 0.3.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.
package/dist/index.js CHANGED
@@ -1301,7 +1301,7 @@ function replaceProjectName(projectDir, projectName) {
1301
1301
  writeFileSync(filePath, content.replaceAll("{{PROJECT_NAME}}", projectName));
1302
1302
  }
1303
1303
  }
1304
- function trimCssShadcn(cssPath) {
1304
+ function trimCssShadcn(cssPath, removeContent = true) {
1305
1305
  if (!existsSync(cssPath))
1306
1306
  return;
1307
1307
  const content = readFileSync(cssPath, "utf-8");
@@ -1318,7 +1318,7 @@ function trimCssShadcn(cssPath) {
1318
1318
  skipping = false;
1319
1319
  continue;
1320
1320
  }
1321
- if (!skipping) {
1321
+ if (!skipping || !removeContent) {
1322
1322
  result.push(line);
1323
1323
  }
1324
1324
  }
@@ -1433,9 +1433,7 @@ async function main() {
1433
1433
  removeHusky: !initGit
1434
1434
  });
1435
1435
  const hasEnv = trimEnvFile(join2(targetDir, ".env.example"), selectedModules);
1436
- if (!selectedModules.includes("shadcn")) {
1437
- trimCssShadcn(join2(targetDir, "app", "globals.css"));
1438
- }
1436
+ trimCssShadcn(join2(targetDir, "app", "globals.css"), !selectedModules.includes("shadcn"));
1439
1437
  if (!initGit) {
1440
1438
  removeHuskyFiles(targetDir);
1441
1439
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rotor",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Scaffold Next.js projects with Bun, Tailwind, Biome, and more",
5
5
  "type": "module",
6
6
  "bin": "dist/index.js",
@@ -1,11 +1,18 @@
1
1
  'use client';
2
2
 
3
+ import { useEffect } from 'react';
4
+
3
5
  export default function ErrorPage({
6
+ error,
4
7
  reset,
5
8
  }: {
6
9
  error: Error & { digest?: string };
7
10
  reset: () => void;
8
11
  }) {
12
+ useEffect(() => {
13
+ console.error(error);
14
+ }, [error]);
15
+
9
16
  return (
10
17
  <main className="flex min-h-screen flex-col items-center justify-center p-24">
11
18
  <h1 className="font-bold text-4xl">Something went wrong</h1>
@@ -19,9 +19,9 @@ export const metadata: Metadata = {
19
19
 
20
20
  export default function RootLayout({
21
21
  children,
22
- }: Readonly<{
22
+ }: {
23
23
  children: React.ReactNode;
24
- }>) {
24
+ }) {
25
25
  return (
26
26
  <html lang="en">
27
27
  <body
@@ -3,7 +3,7 @@
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
5
  "scripts": {
6
- "dev": "next dev --turbopack",
6
+ "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
9
  "check": "bunx @biomejs/biome check --write .",
File without changes
File without changes