create-zen 1.7.1 โ†’ 1.8.0

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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm publish:*)"
5
+ ]
6
+ }
7
+ }
package/README.md CHANGED
@@ -1,193 +1,193 @@
1
- <div align="center">
2
-
3
- [![Typing SVG](https://readme-typing-svg.demolab.com?font=Fira+Code&weight=700&size=25&duration=4000&pause=500&color=05F7C3&center=true&vCenter=true&width=700&lines=Zen+Starter;Stop+worrying+about+setup,+just+code)](https://git.io/typing-svg)
4
-
5
- </div>
6
-
7
- A premium Vite starter kit for rapid web development, designed to streamline your development process. It comes pre-configured with essential tools like TypeScript, Vite, SCSS, and modern UI components.
8
-
9
- <p align="center">
10
- <img src="https://img.shields.io/badge/Vite-646CFF?style=for-the-badge&logo=vite&logoColor=white" alt="Vite"/>
11
- <img src="https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript"/>
12
- <img src="https://img.shields.io/badge/Sass-CC6699?style=for-the-badge&logo=sass&logoColor=white" alt="Sass"/>
13
- <img src="https://img.shields.io/badge/PostCSS-DD3A0A?style=for-the-badge&logo=postcss&logoColor=white" alt="PostCSS"/>
14
- <img src="https://img.shields.io/badge/Handlebars.js-f0772b?style=for-the-badge&logo=handlebars.js&logoColor=white" alt="Handlebars"/>
15
- <img src="https://img.shields.io/badge/Lenis-000000?style=for-the-badge&logo=lenis&logoColor=white" alt="Lenis"/>
16
- </p>
17
-
18
- <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
19
-
20
- ## โœจ Features
21
-
22
- - **๐Ÿš€ Vite**: Next-generation frontend tooling for a blazing fast development experience
23
- - **๐Ÿ›ก๏ธ TypeScript**: Strong typing for more robust and maintainable code
24
- - **๐ŸŽจ SCSS**: CSS with superpowers, enabling variables, nesting, and mixins
25
- - **๐Ÿ”ง ESLint & Prettier**: Code quality and formatting tools
26
- - **โšก PostCSS**: Advanced CSS processing with plugins
27
- - **๐Ÿ“ Handlebars**: Templating engine for clean HTML organization
28
- - **๐ŸŒ€ Lenis**: Buttery smooth scrolling experience
29
- - **๐ŸŽญ Ready-to-use Components**: Tabs, Modals, Accordions, Theme Switcher
30
- - **๐Ÿ“ฑ Responsive Design**: Mobile-first approach with modern breakpoints
31
- - **๐ŸŒ™ Dark/Light Theme**: Built-in theme switching with persistence
32
- - **๐Ÿ“ฆ Modern Build**: Optimized for production with tree-shaking
33
-
34
- <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
35
-
36
- ## ๐Ÿš€ Getting Started
37
-
38
- ### Prerequisites
39
-
40
- - [Node.js](https://nodejs.org/) (version 18.x or higher)
41
- - [npm](https://www.npmjs.com/)
42
-
43
- ### Installation
44
-
45
- You can create a new project using `npm create`:
46
- ```bash
47
- npm create zen@latest
48
- ```
49
-
50
- **Why `@latest`?** This ensures you always get the most recent version of the ZEN starter kit. Without it, npm might use a cached or outdated version.
51
-
52
- The tool will interactively prompt you to:
53
- 1. **Enter your project name** (with a default fallback)
54
- 2. **Choose between two versions**:
55
- - **Standard Version**: Full-featured with all components
56
- - **Lite Version**: Lightweight for static sites
57
-
58
- This makes it easy to get started without remembering command line arguments and gives you flexibility to choose the right version for your needs.
59
-
60
- <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
61
-
62
- ## ๐Ÿ› ๏ธ Available Scripts
63
-
64
- - `npm run dev` - Starts the development server
65
- - `npm run host` - Starts the development server, accessible on your local network
66
- - `npm run build` - Builds the project for production
67
- - `npm run preview` - Serves the production build locally for preview
68
- - `npm run lint` - Lints the TypeScript files in the project
69
- - `npm run lint:fix` - Lints and automatically fixes problems in TypeScript files
70
-
71
- <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
72
-
73
- ## ๐Ÿ“ Project Structure
74
-
75
- ```
76
- zen-starter/
77
- โ”œโ”€โ”€ components/ # Reusable HTML partials
78
- โ”‚ โ”œโ”€โ”€ accordion.html # Accordion component template
79
- โ”‚ โ”œโ”€โ”€ footer.html # Footer component template
80
- โ”‚ โ”œโ”€โ”€ header.html # Header component template
81
- โ”‚ โ”œโ”€โ”€ modal.html # Modal component template
82
- โ”‚ โ””โ”€โ”€ tabs.html # Tabs component template
83
- โ”œโ”€โ”€ pages/ # Project pages
84
- โ”‚ โ”œโ”€โ”€ 404.html # 404 error page
85
- โ”‚ โ””โ”€โ”€ index.html # Main application page
86
- โ”œโ”€โ”€ public/ # Static assets
87
- โ”‚ โ”œโ”€โ”€ fonts/ # Font files
88
- โ”‚ โ””โ”€โ”€ images/ # Image assets
89
- โ”œโ”€โ”€ src/
90
- โ”‚ โ”œโ”€โ”€ scripts/ # TypeScript source code
91
- โ”‚ โ”‚ โ”œโ”€โ”€ components/ # UI component classes
92
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Accordion.ts # Accordion component logic
93
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ BackTopButton.ts # Back to top button
94
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Header.ts # Header component logic
95
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Tabs.ts # Tabs component logic
96
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Theme.ts # Theme switcher
97
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ index.ts # Component exports
98
- โ”‚ โ”‚ โ”œโ”€โ”€ services/ # Service layer
99
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ api.ts # API utilities
100
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ scroll.ts # Smooth scroll service
101
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ storage.ts # Local storage wrapper
102
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ index.ts # Service exports
103
- โ”‚ โ”‚ โ”œโ”€โ”€ types/ # TypeScript type definitions
104
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ global.d.ts # Global type definitions
105
- โ”‚ โ”‚ โ”œโ”€โ”€ utils/ # Utility functions
106
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ modal.ts # Modal utilities
107
- โ”‚ โ”‚ โ””โ”€โ”€ main.ts # Main entry point
108
- โ”‚ โ””โ”€โ”€ styles/ # SCSS stylesheets
109
- โ”‚ โ”œโ”€โ”€ core/ # Core styles
110
- โ”‚ โ”‚ โ”œโ”€โ”€ components/ # Component styles
111
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ back-top-button.scss
112
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ footer.scss
113
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ header.scss
114
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ modal.scss
115
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ index.scss
116
- โ”‚ โ”‚ โ”œโ”€โ”€ helpers/ # SCSS helpers
117
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ functions.scss
118
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ media.scss
119
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ mixins.scss
120
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ index.scss
121
- โ”‚ โ”‚ โ”œโ”€โ”€ fonts.scss # Font definitions
122
- โ”‚ โ”‚ โ”œโ”€โ”€ globals.scss # Global styles
123
- โ”‚ โ”‚ โ”œโ”€โ”€ reset.scss # CSS reset
124
- โ”‚ โ”‚ โ”œโ”€โ”€ typography.scss # Typography styles
125
- โ”‚ โ”‚ โ”œโ”€โ”€ utils.scss # Utility classes
126
- โ”‚ โ”‚ โ”œโ”€โ”€ variables.scss # SCSS variables
127
- โ”‚ โ”‚ โ””โ”€โ”€ index.scss # Core styles index
128
- โ”‚ โ””โ”€โ”€ main.scss # Main stylesheet
129
- โ”œโ”€โ”€ .eslintrc.js # ESLint configuration
130
- โ”œโ”€โ”€ .prettierrc # Prettier configuration
131
- โ”œโ”€โ”€ index.html # Landing page
132
- โ”œโ”€โ”€ package.json # Project dependencies
133
- โ”œโ”€โ”€ postcss.config.js # PostCSS configuration
134
- โ”œโ”€โ”€ tsconfig.json # TypeScript configuration
135
- โ””โ”€โ”€ vite.config.js # Vite configuration
136
- ```
137
-
138
- <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
139
-
140
- ## ๐ŸŽฏ Key Components
141
-
142
- ### UI Components
143
- - **Accordion**: Collapsible content sections with smooth animations
144
- - **Tabs**: Tabbed interface with keyboard navigation
145
- - **Modal**: Lightweight modal system with backdrop
146
- - **Header**: Responsive navigation with mobile menu
147
- - **BackTopButton**: Smooth scroll-to-top functionality
148
- - **ThemeToggle**: Dark/light theme switcher
149
-
150
- ### Services
151
- - **Scroll**: Lenis-powered smooth scrolling
152
- - **Storage**: Type-safe local storage wrapper
153
- - **API**: HTTP request utilities
154
-
155
- ### Utilities
156
- - **Modal Management**: Easy modal initialization and control
157
- - **Type Definitions**: Comprehensive TypeScript types
158
-
159
- <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
160
-
161
- ## ๐ŸŽจ Styling
162
-
163
- The project uses a well-organized SCSS structure:
164
-
165
- - **Variables**: Centralized design tokens
166
- - **Mixins**: Reusable style patterns
167
- - **Functions**: SCSS utility functions
168
- - **Media Queries**: Responsive breakpoint helpers
169
- - **Component Styles**: Modular component styling
170
- - **Utility Classes**: Helper classes for common patterns
171
-
172
- <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
173
-
174
- ## ๐Ÿ”ง Configuration
175
-
176
- ### Vite Configuration
177
- - Multi-page application support
178
- - SCSS preprocessing with modern compiler API
179
- - PostCSS integration with autoprefixer
180
- - Handlebars templating support
181
- - Optimized build output
182
-
183
- ### TypeScript Configuration
184
- - Strict type checking
185
- - Modern ES modules
186
- - Path mapping for clean imports
187
-
188
- ### Code Quality
189
- - ESLint with TypeScript support
190
- - Prettier for consistent formatting
191
- - Pre-commit hooks ready
192
-
1
+ <div align="center">
2
+
3
+ [![Typing SVG](https://readme-typing-svg.demolab.com?font=Fira+Code&weight=700&size=25&duration=4000&pause=500&color=05F7C3&center=true&vCenter=true&width=700&lines=Zen+Starter;Stop+worrying+about+setup,+just+code)](https://git.io/typing-svg)
4
+
5
+ </div>
6
+
7
+ A premium Vite starter kit for rapid web development, designed to streamline your development process. It comes pre-configured with essential tools like TypeScript, Vite, SCSS, and modern UI components.
8
+
9
+ <p align="center">
10
+ <img src="https://img.shields.io/badge/Vite-646CFF?style=for-the-badge&logo=vite&logoColor=white" alt="Vite"/>
11
+ <img src="https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript"/>
12
+ <img src="https://img.shields.io/badge/Sass-CC6699?style=for-the-badge&logo=sass&logoColor=white" alt="Sass"/>
13
+ <img src="https://img.shields.io/badge/PostCSS-DD3A0A?style=for-the-badge&logo=postcss&logoColor=white" alt="PostCSS"/>
14
+ <img src="https://img.shields.io/badge/Handlebars.js-f0772b?style=for-the-badge&logo=handlebars.js&logoColor=white" alt="Handlebars"/>
15
+ <img src="https://img.shields.io/badge/Lenis-000000?style=for-the-badge&logo=lenis&logoColor=white" alt="Lenis"/>
16
+ </p>
17
+
18
+ <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
19
+
20
+ ## โœจ Features
21
+
22
+ - **๐Ÿš€ Vite**: Next-generation frontend tooling for a blazing fast development experience
23
+ - **๐Ÿ›ก๏ธ TypeScript**: Strong typing for more robust and maintainable code
24
+ - **๐ŸŽจ SCSS**: CSS with superpowers, enabling variables, nesting, and mixins
25
+ - **๐Ÿ”ง ESLint & Prettier**: Code quality and formatting tools
26
+ - **โšก PostCSS**: Advanced CSS processing with plugins
27
+ - **๐Ÿ“ Handlebars**: Templating engine for clean HTML organization
28
+ - **๐ŸŒ€ Lenis**: Buttery smooth scrolling experience
29
+ - **๐ŸŽญ Ready-to-use Components**: Tabs, Modals, Accordions, Theme Switcher
30
+ - **๐Ÿ“ฑ Responsive Design**: Mobile-first approach with modern breakpoints
31
+ - **๐ŸŒ™ Dark/Light Theme**: Built-in theme switching with persistence
32
+ - **๐Ÿ“ฆ Modern Build**: Optimized for production with tree-shaking
33
+
34
+ <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
35
+
36
+ ## ๐Ÿš€ Getting Started
37
+
38
+ ### Prerequisites
39
+
40
+ - [Node.js](https://nodejs.org/) (version 18.x or higher)
41
+ - [npm](https://www.npmjs.com/)
42
+
43
+ ### Installation
44
+
45
+ You can create a new project using `npm create`:
46
+ ```bash
47
+ npm create zen@latest -- --yes
48
+ ```
49
+
50
+ **Why `@latest`?** This ensures you always get the most recent version of the ZEN starter kit. Without it, npm might use a cached or outdated version.
51
+
52
+ **Why `--yes`?** This skips the initial "install create-zen" confirmation and starts the setup immediately.
53
+
54
+ The tool will interactively prompt you to:
55
+ 1. **Enter your project name** (with a default fallback)
56
+ 2. **Choose a starter variant**:
57
+ - **Standard**: BEM + SCSS + TypeScript (`zen-starter`)
58
+ - **Express**: Tailwind CSS + Alpine.js (`zen-express`)
59
+
60
+ <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
61
+
62
+ ## ๐Ÿ› ๏ธ Available Scripts
63
+
64
+ - `npm run dev` - Starts the development server
65
+ - `npm run host` - Starts the development server, accessible on your local network
66
+ - `npm run build` - Builds the project for production
67
+ - `npm run preview` - Serves the production build locally for preview
68
+ - `npm run lint` - Lints the TypeScript files in the project
69
+ - `npm run lint:fix` - Lints and automatically fixes problems in TypeScript files
70
+
71
+ <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
72
+
73
+ ## ๐Ÿ“ Project Structure
74
+
75
+ ```
76
+ zen-starter/
77
+ โ”œโ”€โ”€ components/ # Reusable HTML partials
78
+ โ”‚ โ”œโ”€โ”€ accordion.html # Accordion component template
79
+ โ”‚ โ”œโ”€โ”€ footer.html # Footer component template
80
+ โ”‚ โ”œโ”€โ”€ header.html # Header component template
81
+ โ”‚ โ”œโ”€โ”€ modal.html # Modal component template
82
+ โ”‚ โ””โ”€โ”€ tabs.html # Tabs component template
83
+ โ”œโ”€โ”€ pages/ # Project pages
84
+ โ”‚ โ”œโ”€โ”€ 404.html # 404 error page
85
+ โ”‚ โ””โ”€โ”€ index.html # Main application page
86
+ โ”œโ”€โ”€ public/ # Static assets
87
+ โ”‚ โ”œโ”€โ”€ fonts/ # Font files
88
+ โ”‚ โ””โ”€โ”€ images/ # Image assets
89
+ โ”œโ”€โ”€ src/
90
+ โ”‚ โ”œโ”€โ”€ scripts/ # TypeScript source code
91
+ โ”‚ โ”‚ โ”œโ”€โ”€ components/ # UI component classes
92
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Accordion.ts # Accordion component logic
93
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ BackTopButton.ts # Back to top button
94
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Header.ts # Header component logic
95
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Tabs.ts # Tabs component logic
96
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Theme.ts # Theme switcher
97
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ index.ts # Component exports
98
+ โ”‚ โ”‚ โ”œโ”€โ”€ services/ # Service layer
99
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ api.ts # API utilities
100
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ scroll.ts # Smooth scroll service
101
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ storage.ts # Local storage wrapper
102
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ index.ts # Service exports
103
+ โ”‚ โ”‚ โ”œโ”€โ”€ types/ # TypeScript type definitions
104
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ global.d.ts # Global type definitions
105
+ โ”‚ โ”‚ โ”œโ”€โ”€ utils/ # Utility functions
106
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ modal.ts # Modal utilities
107
+ โ”‚ โ”‚ โ””โ”€โ”€ main.ts # Main entry point
108
+ โ”‚ โ””โ”€โ”€ styles/ # SCSS stylesheets
109
+ โ”‚ โ”œโ”€โ”€ core/ # Core styles
110
+ โ”‚ โ”‚ โ”œโ”€โ”€ components/ # Component styles
111
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ back-top-button.scss
112
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ footer.scss
113
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ header.scss
114
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ modal.scss
115
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ index.scss
116
+ โ”‚ โ”‚ โ”œโ”€โ”€ helpers/ # SCSS helpers
117
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ functions.scss
118
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ media.scss
119
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ mixins.scss
120
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ index.scss
121
+ โ”‚ โ”‚ โ”œโ”€โ”€ fonts.scss # Font definitions
122
+ โ”‚ โ”‚ โ”œโ”€โ”€ globals.scss # Global styles
123
+ โ”‚ โ”‚ โ”œโ”€โ”€ reset.scss # CSS reset
124
+ โ”‚ โ”‚ โ”œโ”€โ”€ typography.scss # Typography styles
125
+ โ”‚ โ”‚ โ”œโ”€โ”€ utils.scss # Utility classes
126
+ โ”‚ โ”‚ โ”œโ”€โ”€ variables.scss # SCSS variables
127
+ โ”‚ โ”‚ โ””โ”€โ”€ index.scss # Core styles index
128
+ โ”‚ โ””โ”€โ”€ main.scss # Main stylesheet
129
+ โ”œโ”€โ”€ .eslintrc.js # ESLint configuration
130
+ โ”œโ”€โ”€ .prettierrc # Prettier configuration
131
+ โ”œโ”€โ”€ index.html # Landing page
132
+ โ”œโ”€โ”€ package.json # Project dependencies
133
+ โ”œโ”€โ”€ postcss.config.js # PostCSS configuration
134
+ โ”œโ”€โ”€ tsconfig.json # TypeScript configuration
135
+ โ””โ”€โ”€ vite.config.js # Vite configuration
136
+ ```
137
+
138
+ <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
139
+
140
+ ## ๐ŸŽฏ Key Components
141
+
142
+ ### UI Components
143
+ - **Accordion**: Collapsible content sections with smooth animations
144
+ - **Tabs**: Tabbed interface with keyboard navigation
145
+ - **Modal**: Lightweight modal system with backdrop
146
+ - **Header**: Responsive navigation with mobile menu
147
+ - **BackTopButton**: Smooth scroll-to-top functionality
148
+ - **ThemeToggle**: Dark/light theme switcher
149
+
150
+ ### Services
151
+ - **Scroll**: Lenis-powered smooth scrolling
152
+ - **Storage**: Type-safe local storage wrapper
153
+ - **API**: HTTP request utilities
154
+
155
+ ### Utilities
156
+ - **Modal Management**: Easy modal initialization and control
157
+ - **Type Definitions**: Comprehensive TypeScript types
158
+
159
+ <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
160
+
161
+ ## ๐ŸŽจ Styling
162
+
163
+ The project uses a well-organized SCSS structure:
164
+
165
+ - **Variables**: Centralized design tokens
166
+ - **Mixins**: Reusable style patterns
167
+ - **Functions**: SCSS utility functions
168
+ - **Media Queries**: Responsive breakpoint helpers
169
+ - **Component Styles**: Modular component styling
170
+ - **Utility Classes**: Helper classes for common patterns
171
+
172
+ <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
173
+
174
+ ## ๐Ÿ”ง Configuration
175
+
176
+ ### Vite Configuration
177
+ - Multi-page application support
178
+ - SCSS preprocessing with modern compiler API
179
+ - PostCSS integration with autoprefixer
180
+ - Handlebars templating support
181
+ - Optimized build output
182
+
183
+ ### TypeScript Configuration
184
+ - Strict type checking
185
+ - Modern ES modules
186
+ - Path mapping for clean imports
187
+
188
+ ### Code Quality
189
+ - ESLint with TypeScript support
190
+ - Prettier for consistent formatting
191
+ - Pre-commit hooks ready
192
+
193
193
  <img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" alt="line" />
package/index.js CHANGED
@@ -1,110 +1,177 @@
1
- #!/usr/bin/env node
2
-
3
- import { execSync } from 'child_process';
4
- import fs from 'fs';
5
- import path from 'path';
6
- import prompts from 'prompts';
7
- import chalk from 'chalk';
8
- import ora from 'ora';
9
-
10
- // Color palette inspired by the ZEN website
11
- const colors = {
12
- green: '#00D4AA', // Less acidic, more blue-green
13
- lightGreen: '#00B894', // Darker blue-green
14
- purple: '#8B5CF6', // Purple accent
15
- darkPurple: '#7C3AED', // Darker purple
16
- lightPurple: '#A78BFA', // Light purple
17
- white: '#FFFFFF', // Pure white
18
- lightGrey: '#9CA3AF', // Light grey
19
- darkGrey: '#374151', // Dark grey
20
- bgDark: '#1F2937' // Background dark
21
- };
22
-
23
- // Enhanced text styling with chalk
24
- const zen = (text) => chalk.hex(colors.green).bold(text);
25
- const accent = (text) => chalk.hex(colors.purple).bold(text);
26
- const title = (text) => chalk.hex(colors.white).bold(text);
27
- const subtitle = (text) => chalk.hex(colors.lightGrey)(text);
28
- const highlight = (text) => chalk.hex(colors.lightGreen)(text);
29
- const error = (text) => chalk.red.bold(text);
30
- const success = (text) => chalk.green.bold(text);
31
- const info = (text) => chalk.blue(text);
32
-
33
- // Display minimalistic header
34
- const displayHeader = () => {
35
- console.clear();
36
- console.log();
37
- console.log(` ${zen('ZEN')} - ${title('The Professional Web Development Starter')}`);
38
- console.log();
39
- };
40
-
41
- // Get project name with enhanced styling
42
- const getProjectName = async () => {
43
- const { projectName } = await prompts({
44
- type: 'text',
45
- name: 'projectName',
46
- message: 'Project name:',
47
- initial: 'zen-starter-app',
48
- validate: (value) => {
49
- if (!value.trim()) return 'Project name is required';
50
- if (fs.existsSync(value.trim())) return 'Directory already exists';
51
- return true;
52
- }
53
- });
54
-
55
- return projectName;
56
- };
57
-
58
- // Get repository URL
59
- const getRepositoryUrl = () => 'https://github.com/dmitry-conquer/zen-starter.git';
60
-
61
- // Main function with enhanced UX
62
- const main = async () => {
63
- try {
64
- displayHeader();
65
-
66
- const PROJECT_NAME = await getProjectName();
67
- const REPO_URL = getRepositoryUrl();
68
-
69
- // Cloning with spinner
70
- const spinner = ora({
71
- text: `${chalk.hex(colors.green)('โ—‡')} ${title('Preparing your ZEN project...')}`,
72
- color: 'green'
73
- }).start();
74
-
75
- try {
76
- execSync(`git clone --depth=1 "${REPO_URL}" "${PROJECT_NAME}"`, { stdio: 'pipe' });
77
- spinner.stop();
78
- } catch (err) {
79
- spinner.fail(`${error('Setup failed!')}`);
80
- console.log(` ${subtitle('Please check your internet connection, permissions, and try again.')}`);
81
- process.exit(1);
82
- }
83
-
84
- // Remove .git
85
- fs.rmSync(path.join(PROJECT_NAME, '.git'), { recursive: true, force: true });
86
-
87
- // Success message
88
- console.log();
89
- console.log(` ${chalk.hex(colors.darkPurple)('โœ… SUCCESS! Your project is ready to go!')} ${chalk.hex(colors.lightPurple)('๐ŸŽ‰')}`);
90
- console.log();
91
-
92
- // Next steps
93
- console.log(` ${chalk.hex(colors.green)('โ—‡')} ${title('Next steps')}`);
94
- console.log(` ${chalk.hex(colors.purple)('๐Ÿ“')} ${highlight(`cd ${PROJECT_NAME}`)}`);
95
- console.log(` ${chalk.hex(colors.purple)('๐Ÿ“ฆ')} ${highlight('npm install')}`);
96
- console.log(` ${chalk.hex(colors.purple)('๐Ÿง‘โ€๐Ÿ’ป')} ${highlight('npm run dev')}`);
97
- console.log();
98
-
99
- // Final message
100
- console.log(` ${zen('Happy coding with ZEN!')} ${chalk.hex(colors.lightPurple)('โœจ')}`);
101
- console.log();
102
-
103
- } catch (err) {
104
- console.log(` ${error('โŒ An error occurred:')} ${err.message}`);
105
- process.exit(1);
106
- }
107
- };
108
-
109
- // Run the main function
110
- main();
1
+ #!/usr/bin/env node
2
+
3
+ import { execSync } from 'child_process';
4
+ import fs from 'fs';
5
+ import path from 'path';
6
+ import prompts from 'prompts';
7
+ import chalk from 'chalk';
8
+ import ora from 'ora';
9
+
10
+ const c = {
11
+ teal: (t) => chalk.hex('#2DD4BF').bold(t),
12
+ tealDim: (t) => chalk.hex('#2DD4BF')(t),
13
+ violet: (t) => chalk.hex('#A78BFA').bold(t),
14
+ violetDim: (t) => chalk.hex('#A78BFA')(t),
15
+ amber: (t) => chalk.hex('#FCD34D').bold(t),
16
+ amberDim: (t) => chalk.hex('#FCD34D')(t),
17
+ white: (t) => chalk.hex('#F9FAFB').bold(t),
18
+ muted: (t) => chalk.hex('#6B7280')(t),
19
+ dim: (t) => chalk.hex('#374151')(t),
20
+ green: (t) => chalk.hex('#34D399')(t),
21
+ red: (t) => chalk.hex('#F87171')(t),
22
+ };
23
+
24
+ const line = () => c.dim(' ' + 'โ”€'.repeat(44));
25
+
26
+ const displayHeader = () => {
27
+ console.clear();
28
+ console.log();
29
+ console.log(` ${c.teal('ZEN')} ${c.muted('ยท')} ${c.white('Web Development Starters')}`);
30
+ console.log(line());
31
+ console.log();
32
+ };
33
+
34
+ const getProjectName = async () => {
35
+ const { projectName } = await prompts({
36
+ type: 'text',
37
+ name: 'projectName',
38
+ message: c.white('Project name'),
39
+ initial: 'my-project',
40
+ validate: (value) => {
41
+ if (!value.trim()) return 'Project name is required';
42
+ if (fs.existsSync(value.trim())) return `"${value.trim()}" already exists`;
43
+ return true;
44
+ }
45
+ });
46
+
47
+ if (!projectName) process.exit(0);
48
+ return projectName;
49
+ };
50
+
51
+ const getStarterVariant = async () => {
52
+ console.log();
53
+ const { variant } = await prompts({
54
+ type: 'select',
55
+ name: 'variant',
56
+ message: c.white('Choose a starter'),
57
+ choices: [
58
+ {
59
+ title: `${c.teal('Express')} ${c.muted('Tailwind CSS + Alpine.js')}`,
60
+ description: 'Fast, utility-first setup for modern projects',
61
+ value: 'express'
62
+ },
63
+ {
64
+ title: `${c.violet('AI')} ${c.muted('Tailwind CSS + Alpine.js + Claude Code')}`,
65
+ description: 'AI-powered automatic site builder using Claude Code',
66
+ value: 'ai'
67
+ },
68
+ {
69
+ title: `${c.muted('Standard')} ${c.muted('BEM + SCSS + TypeScript')}`,
70
+ description: 'Classic setup ยท not actively maintained',
71
+ value: 'standard'
72
+ }
73
+ ],
74
+ initial: 0,
75
+ hint: ' '
76
+ });
77
+
78
+ if (!variant) process.exit(0);
79
+ console.log();
80
+ return variant;
81
+ };
82
+
83
+ const getRepositoryUrl = (variant) => {
84
+ const repos = {
85
+ express: 'https://github.com/dmitry-conquer/zen-express.git',
86
+ ai: 'https://github.com/dmitry-conquer/zen-ai.git',
87
+ standard: 'https://github.com/dmitry-conquer/zen-starter.git',
88
+ };
89
+ return repos[variant];
90
+ };
91
+
92
+ const getNextSteps = (variant, name) => {
93
+ const steps = [
94
+ { cmd: `cd ${name}`, label: 'enter project' },
95
+ { cmd: 'npm install', label: 'install deps' },
96
+ ];
97
+
98
+ if (variant === 'ai') {
99
+ steps.push({ cmd: 'claude', label: 'open claude code' });
100
+ steps.push({ cmd: 'npm run dev', label: 'start dev server' });
101
+ } else {
102
+ steps.push({ cmd: 'npm run dev', label: 'start dev server' });
103
+ }
104
+
105
+ return steps;
106
+ };
107
+
108
+ const main = async () => {
109
+ try {
110
+ displayHeader();
111
+
112
+ const PROJECT_NAME = await getProjectName();
113
+ const variant = await getStarterVariant();
114
+ const REPO_URL = getRepositoryUrl(variant);
115
+
116
+ const spinner = ora({
117
+ text: ` ${c.muted('Cloning repository...')}`,
118
+ spinner: 'dots',
119
+ color: 'cyan'
120
+ }).start();
121
+
122
+ try {
123
+ execSync(`git clone --depth=1 "${REPO_URL}" "${PROJECT_NAME}"`, { stdio: 'pipe' });
124
+ spinner.stop();
125
+ } catch (err) {
126
+ spinner.stop();
127
+ console.log();
128
+ console.log(` ${c.red('โœ—')} ${c.white('Clone failed.')} ${c.muted('Check your connection and try again.')}`);
129
+ console.log();
130
+ process.exit(1);
131
+ }
132
+
133
+ fs.rmSync(path.join(PROJECT_NAME, '.git'), { recursive: true, force: true });
134
+
135
+ // Success
136
+ console.log(` ${c.green('โœ“')} ${c.white('Project ready')} ${c.tealDim(PROJECT_NAME)}`);
137
+ console.log();
138
+ console.log(line());
139
+ console.log();
140
+
141
+ // Next steps
142
+ const steps = getNextSteps(variant, PROJECT_NAME);
143
+ console.log(` ${c.muted('Next steps')}`);
144
+ console.log();
145
+ steps.forEach(({ cmd, label }, i) => {
146
+ const num = c.dim(`${i + 1}.`);
147
+ console.log(` ${num} ${c.tealDim(cmd)} ${c.muted(label)}`);
148
+ });
149
+
150
+ if (variant === 'ai') {
151
+ console.log();
152
+ console.log(` ${c.muted('โ”€'.repeat(44))}`);
153
+ console.log(` ${c.violetDim('tip')} ${c.muted('Open Claude Code and let the AI build your site')}`);
154
+ console.log(` ${c.muted('automatically from your project description.')}`);
155
+ }
156
+
157
+ if (variant === 'standard') {
158
+ console.log();
159
+ console.log(` ${c.muted('note')} ${c.muted('Standard starter is not actively maintained.')}`);
160
+ console.log(` ${c.muted('Consider using Express for new projects.')}`);
161
+ }
162
+
163
+ console.log();
164
+ console.log(line());
165
+ console.log();
166
+ console.log(` ${c.teal('ZEN')} ${c.muted('Happy building.')}`);
167
+ console.log();
168
+
169
+ } catch (err) {
170
+ console.log();
171
+ console.log(` ${c.red('โœ—')} ${err.message}`);
172
+ console.log();
173
+ process.exit(1);
174
+ }
175
+ };
176
+
177
+ main();
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
- {
2
- "name": "create-zen",
3
- "version": "1.7.1",
4
- "type": "module",
5
- "description": "โœจ Create a new web development project with modern setup powered by Vite ๐Ÿš€",
6
- "bin": {
7
- "create-zen": "index.js"
8
- },
9
- "dependencies": {
10
- "fs-extra": "^11.1.1",
11
- "prompts": "^2.4.2",
12
- "chalk": "^5.3.0",
13
- "ora": "^7.0.1"
14
- }
15
- }
1
+ {
2
+ "name": "create-zen",
3
+ "version": "1.8.0",
4
+ "type": "module",
5
+ "description": "โœจ Create a new web development project with modern setup powered by Vite ๐Ÿš€",
6
+ "bin": {
7
+ "create-zen": "index.js"
8
+ },
9
+ "dependencies": {
10
+ "fs-extra": "^11.1.1",
11
+ "prompts": "^2.4.2",
12
+ "chalk": "^5.3.0",
13
+ "ora": "^7.0.1"
14
+ }
15
+ }