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
|
-
|
|
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
package/template/app/error.tsx
CHANGED
|
@@ -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>
|
package/template/app/layout.tsx
CHANGED
package/template/package.json
CHANGED
|
File without changes
|
|
File without changes
|