next-configure 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/README.md +116 -28
  2. package/package.json +11 -2
package/README.md CHANGED
@@ -1,51 +1,139 @@
1
1
  # next-configure
2
2
 
3
- Zero-config CLI to wire up Tailwind v4 + shadcn/ui and basic structure in a Next.js App Router project.
3
+ Minimal CLI tool to configure Next.js projects quickly and cleanly.
4
4
 
5
5
  ## Install
6
6
 
7
- Use directly with `npx`:
7
+ Run directly with `npx` from your Next.js project root:
8
8
 
9
9
  ```bash
10
10
  npx next-configure
11
11
  ```
12
12
 
13
- Or install as a dev dependency:
13
+ This should be executed inside an existing Next.js App Router project (where `package.json` with `next` is present).
14
14
 
15
- ```bash
16
- npm install --save-dev next-configure
17
- ```
15
+ ---
18
16
 
19
- Then run:
17
+ ## Overview
20
18
 
21
- ```bash
22
- npx next-configure
23
- ```
19
+ `next-configure` automates common setup tasks you usually repeat after running `create-next-app`:
24
20
 
25
- ## What it does
21
+ - Detects a valid Next.js App Router project.
22
+ - Optionally installs and wires up `shadcn/ui`.
23
+ - Creates standard development folders.
24
+ - Generates a Tailwind v4–compatible theme in `globals.css` from your brand colors.
26
25
 
27
- - Verifies you are in a Next.js project (`next` in `dependencies` or `devDependencies`).
28
- - Detects `src/` and creates `components`, `hooks`, `utils` in `src/` or project root.
29
- - Optionally runs `shadcn init` and installs the `button` component.
30
- - Locates `src/app/globals.css` or `app/globals.css` and overwrites it with:
31
- - Tailwind v4 imports (`@import "tailwindcss";`, `@import "tw-animate-css";`)
32
- - `@theme inline` mapping Tailwind tokens to CSS variables
33
- - `:root` variables for primary/secondary (with auto light/dark variants) and core UI colors
34
- - A minimal `@layer base` for body and border styles
26
+ The goal is to speed up setup while staying minimal and under your control.
35
27
 
36
- ## Usage
28
+ ---
37
29
 
38
- Run from the root of your Next.js App Router project:
30
+ ## CLI Demo
31
+
32
+ Example interaction:
39
33
 
40
34
  ```bash
41
- npx next-configure
35
+ $ npx next-configure
36
+
37
+ ✔ Detected Next.js project
38
+ ? Do you want to install shadcn/ui? › yes
39
+ ✔ Installing shadcn/ui
40
+
41
+ ? Do you want to generate standard development folders? › yes
42
+ ✔ Created components
43
+ ✔ Created hooks
44
+ ✔ Created utils
45
+
46
+ ? Do you want to set color theme? › yes
47
+ ? Enter primary color (hex without #) › 2563eb
48
+ ? Enter secondary color (hex without #) › f97316
49
+
50
+ ✔ globals.css overwritten successfully
51
+ ✔ Setup complete
42
52
  ```
43
53
 
44
- You will be asked:
54
+ ---
55
+
56
+ ## What It Configures
57
+
58
+ ### Folders
59
+
60
+ If you opt in:
61
+
62
+ - When `src/` exists:
63
+ - `src/components`
64
+ - `src/hooks`
65
+ - `src/utils`
66
+ - Otherwise:
67
+ - `components`
68
+ - `hooks`
69
+ - `utils`
70
+
71
+ Existing folders are left as-is; missing ones are created.
72
+
73
+ ### Theme in `globals.css`
74
+
75
+ If you choose to set a color theme:
76
+
77
+ - Locates one of:
78
+ - `src/app/globals.css`
79
+ - `app/globals.css`
80
+ - Overwrites it with:
81
+ - Tailwind v4–style imports:
82
+ - `@import "tailwindcss";`
83
+ - `@import "tw-animate-css";`
84
+ - A theme based on CSS variables:
85
+ - Primary and secondary colors (from your input).
86
+ - Automatically generated light and dark variants.
87
+ - Utility classes, for example:
88
+ - `bg-primary`, `bg-secondary`
89
+ - `text-primary`, `text-secondary`
90
+
91
+ If `globals.css` is not found in `app/` or `src/app/`, the CLI exits with a clear error.
92
+
93
+ ---
94
+
95
+ ## Design Principles
96
+
97
+ - Minimal surface area.
98
+ - No enforced application architecture.
99
+ - Does not touch layout or routing files.
100
+ - Uses a small, focused dependency set.
101
+ - All major actions are opt-in via prompts.
102
+
103
+ ---
104
+
105
+ ## Requirements
106
+
107
+ - Node.js **18+**
108
+ - Next.js **13+** with **App Router**
109
+ - Tailwind v4-compatible setup with `globals.css` under `app/` or `src/app/`
110
+
111
+ ---
112
+
113
+ ## Contributing
114
+
115
+ This project is open source. Contributions are welcome.
116
+
117
+ - For substantial changes, please open an issue first to discuss the direction.
118
+ - For small fixes or improvements, submit a pull request with a clear description.
119
+
120
+ Please keep changes aligned with the goals of being minimal, predictable, and Next.js App Router–focused.
121
+
122
+ ---
123
+
124
+ ## Issues
125
+
126
+ If you run into a bug or want to request a feature:
127
+
128
+ - Open an issue on GitHub with:
129
+ - Steps to reproduce (if applicable).
130
+ - Your Node.js and Next.js versions.
131
+ - Any relevant CLI output.
132
+
133
+ Source code and issue tracker: https://github.com/bilal-dev02/next-configure
134
+
135
+ ---
45
136
 
46
- 1. Whether to install shadcn/ui.
47
- 2. Whether to create `components`, `hooks`, `utils` folders.
48
- 3. Whether to set a color theme.
49
- - If yes, enter primary and secondary hex colors (without `#`).
137
+ ## License
50
138
 
51
- If globals.css is missing in `app/` or `src/app/`, the CLI exits with a clear error.
139
+ MIT
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "next-configure",
3
- "version": "0.1.2",
4
- "description": "Zero-config CLI to Tailwind v4 + shadcn/ui theme and folder structure in Next.js App Router projects.",
3
+ "version": "0.1.4",
4
+ "description": "Zero-config CLI to wire up Tailwind v4 + shadcn/ui and structure in a Next.js App Router project.",
5
+ "license": "MIT",
5
6
  "type": "module",
6
7
  "bin": {
7
8
  "next-configure": "./dist/index.js"
@@ -38,6 +39,14 @@
38
39
  "theme",
39
40
  "design system"
40
41
  ],
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/bilal-dev02/next-configure.git"
45
+ },
46
+ "homepage": "https://github.com/bilal-dev02/next-configure",
47
+ "bugs": {
48
+ "url": "https://github.com/bilal-dev02/next-configure/issues"
49
+ },
41
50
  "files": [
42
51
  "dist",
43
52
  "README.md"