create-rotor 0.2.0 → 0.2.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/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # create-rotor
2
+
3
+ Scaffold Next.js projects with Bun, Tailwind CSS, Biome, and more.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ bunx create-rotor my-app
9
+ ```
10
+
11
+ Or with npx:
12
+
13
+ ```bash
14
+ npx create-rotor my-app
15
+ ```
16
+
17
+ The CLI will guide you through selecting optional features, installing dependencies, and initializing a git repository.
18
+
19
+ ## What's Included
20
+
21
+ Every generated project comes with:
22
+
23
+ - [Next.js](https://nextjs.org) with Turbopack
24
+ - [Tailwind CSS](https://tailwindcss.com) v4
25
+ - [Biome](https://biomejs.dev) for linting, formatting, and import sorting
26
+ - [Geist](https://vercel.com/font) font family
27
+ - [Husky](https://typicode.github.io/husky) + [lint-staged](https://github.com/lint-staged/lint-staged) for pre-commit checks
28
+ - TypeScript
29
+
30
+ ## Optional Features
31
+
32
+ | Feature | Description |
33
+ |---|---|
34
+ | **shadcn/ui** | UI component library built on Base UI |
35
+ | **SWR** | Data fetching and caching |
36
+ | **Drizzle + Supabase** | Database ORM with PostgreSQL |
37
+ | **Vercel AI SDK** | AI integration with OpenAI |
38
+
39
+ ## Biome Configuration
40
+
41
+ Generated projects include a strict Biome setup beyond the recommended defaults:
42
+
43
+ - **Code quality** — `noUnusedImports`, `noExplicitAny`, `noNonNullAssertion`, `noBarrelFile`
44
+ - **Style** — `useImportType`, `useConsistentArrayType`, `useForOf`, `useFilenamingConvention` (kebab-case)
45
+ - **Tailwind** — `useSortedClasses` with `cn`/`clsx`/`cva` support
46
+ - **Assist** — Auto import sorting via `organizeImports`
47
+
48
+ ## Options
49
+
50
+ ```
51
+ Usage: create-rotor [project-name]
52
+
53
+ Options:
54
+ -v, --version Show version
55
+ -h, --help Show help
56
+ ```
57
+
58
+ ## License
59
+
60
+ MIT
package/dist/index.js CHANGED
@@ -1285,12 +1285,7 @@ function removeModuleFiles(projectDir, selectedModules) {
1285
1285
  }
1286
1286
  }
1287
1287
  function replaceProjectName(projectDir, projectName) {
1288
- const filesToReplace = [
1289
- "package.json",
1290
- "app/layout.tsx",
1291
- "app/page.tsx",
1292
- "README.md"
1293
- ];
1288
+ const filesToReplace = ["package.json", "app/layout.tsx", "README.md"];
1294
1289
  for (const file of filesToReplace) {
1295
1290
  const filePath = join(projectDir, file);
1296
1291
  if (!existsSync(filePath))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rotor",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Scaffold Next.js projects with Bun, Tailwind, Biome, and more",
5
5
  "type": "module",
6
6
  "bin": "dist/index.js",
@@ -18,6 +18,10 @@
18
18
  "@types/node": "25.5.0",
19
19
  "typescript": "5.9.3"
20
20
  },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/yikZero/rotor"
24
+ },
21
25
  "keywords": ["create", "nextjs", "bun", "tailwind", "scaffold", "template"],
22
26
  "license": "MIT"
23
27
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "next-devtools": {
4
+ "command": "npx",
5
+ "args": ["-y", "next-devtools-mcp@latest"]
6
+ }
7
+ }
8
+ }
@@ -10,3 +10,12 @@ bun dev
10
10
  ```
11
11
 
12
12
  Open [http://localhost:3000](http://localhost:3000).
13
+
14
+ ## MCP Support
15
+
16
+ This project includes [next-devtools-mcp](https://github.com/vercel/next-devtools-mcp) for AI coding agents (see `.mcp.json`). Start `bun dev` and your agent can access errors, routes, and app state automatically.
17
+
18
+ Other recommended MCP tools:
19
+
20
+ - [Context7](https://github.com/upstash/context7) — Up-to-date library docs: `npx ctx7 setup`
21
+ - [Playwright MCP](https://github.com/microsoft/playwright-mcp) — Browser testing and verification
@@ -1,4 +1,4 @@
1
- @import 'tailwindcss';
1
+ @import "tailwindcss";
2
2
 
3
3
  @theme inline {
4
4
  --font-sans: var(--font-geist-sans);
@@ -1,7 +1,7 @@
1
1
  export default function Home() {
2
2
  return (
3
3
  <main className="flex min-h-screen flex-col items-center justify-center p-24">
4
- <h1 className="text-4xl font-bold">{{PROJECT_NAME}}</h1>
4
+ <h1 className="font-bold text-4xl">Hello World</h1>
5
5
  </main>
6
6
  );
7
7
  }
@@ -4,6 +4,12 @@
4
4
  "indentStyle": "space",
5
5
  "indentWidth": 2
6
6
  },
7
+ "css": {
8
+ "parser": {
9
+ "cssModules": true,
10
+ "tailwindDirectives": true
11
+ }
12
+ },
7
13
  "javascript": {
8
14
  "formatter": {
9
15
  "quoteStyle": "single",
@@ -12,7 +18,47 @@
12
18
  },
13
19
  "linter": {
14
20
  "rules": {
15
- "recommended": true
21
+ "recommended": true,
22
+ "correctness": {
23
+ "noUnusedImports": "error",
24
+ "noUnusedFunctionParameters": "error"
25
+ },
26
+ "style": {
27
+ "useImportType": "error",
28
+ "useExportType": "error",
29
+ "useConsistentArrayType": "error",
30
+ "useForOf": "error",
31
+ "useNodejsImportProtocol": "error",
32
+ "noNonNullAssertion": "error",
33
+ "useFilenamingConvention": {
34
+ "level": "error",
35
+ "options": {
36
+ "filenameCases": ["kebab-case"]
37
+ }
38
+ }
39
+ },
40
+ "performance": {
41
+ "noBarrelFile": "error"
42
+ },
43
+ "suspicious": {
44
+ "noConsole": "warn",
45
+ "noExplicitAny": "error"
46
+ },
47
+ "nursery": {
48
+ "useSortedClasses": {
49
+ "level": "error",
50
+ "options": {
51
+ "functions": ["cn", "clsx", "cva"]
52
+ }
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "assist": {
58
+ "actions": {
59
+ "source": {
60
+ "organizeImports": "on"
61
+ }
16
62
  }
17
63
  },
18
64
  "files": {
@@ -5,6 +5,6 @@ export default defineConfig({
5
5
  schema: './lib/schema.ts',
6
6
  dialect: 'postgresql',
7
7
  dbCredentials: {
8
- url: process.env.DATABASE_URL!,
8
+ url: process.env.DATABASE_URL ?? '',
9
9
  },
10
10
  });
@@ -1,7 +1,7 @@
1
1
  import { drizzle } from 'drizzle-orm/postgres-js';
2
2
  import postgres from 'postgres';
3
3
 
4
- const connectionString = process.env.DATABASE_URL!;
4
+ const connectionString = process.env.DATABASE_URL ?? '';
5
5
  const client = postgres(connectionString);
6
6
 
7
7
  export const db = drizzle({ client });
@@ -1,4 +1,4 @@
1
- import { clsx, type ClassValue } from 'clsx';
1
+ import { type ClassValue, clsx } from 'clsx';
2
2
  import { twMerge } from 'tailwind-merge';
3
3
 
4
4
  export function cn(...inputs: ClassValue[]) {