neex 0.6.99 β†’ 0.7.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 CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  <div align="center">
2
3
  <a href="https://github.com/Neexjs">
3
4
  <picture>
@@ -6,9 +7,10 @@
6
7
  </picture>
7
8
  </a>
8
9
 
9
- # Neex v0.6.37
10
+ # Neex v0.7.1
11
+
12
+ ### Neex - Modern Fullstack Framework Built on Express and Next.js. Fast to Start, Easy to Build, Ready to Deploy.
10
13
 
11
- ### πŸš€ Neex: The Modern Build System for Polyrepo-in-Monorepo Architecture
12
14
 
13
15
  [![NPM version](https://img.shields.io/npm/v/neex.svg?style=for-the-badge&labelColor=000000&color=0066FF&borderRadius=8)](https://www.npmjs.com/package/neex)
14
16
  [![Download Count](https://img.shields.io/npm/dt/neex.svg?style=for-the-badge&labelColor=000000&color=0066FF&borderRadius=8)](https://www.npmjs.com/package/neex)
@@ -16,475 +18,342 @@
16
18
  [![GitHub](https://img.shields.io/badge/GitHub-Neex-0066FF.svg?style=for-the-badge&logo=github&labelColor=000000&logoWidth=20&borderRadius=8)](https://github.com/Neexjs)
17
19
  </div>
18
20
 
19
- ## 🎯 Overview
20
21
 
21
- next + express = neex 🌱
22
-
23
- Neex is a modern build system and script runner designed for **Polyrepo-in-Monorepo** architectures, but powerful enough for any project. It simplifies managing and running multiple scripts across your project, whether they are microservices, frontend applications, or build tasks. Neex offers robust features like parallel and sequential execution, live-reloading for development (`watch`), optimized server running (`servers`), and even basic process management (`pm2`-like commands), all aimed at making your development workflow more efficient, organized, and visually clear.
22
+ ## 🎯 Overview
24
23
 
25
- ## ✨ Key Features
24
+ **Neex = nextjs + express 🌱**
26
25
 
27
- - 🎨 **Colored Output** - Distinguish commands with unique colors
28
- - ⚑ **Dual Execution Modes** - Run commands in parallel (`px`) or sequence (`s`, `run`)
29
- - ⏱️ **Smart Timing** - Track execution time for each command
30
- - πŸ›‘ **Error Control** - Stop on first error (perfect for CI/CD)
31
- - πŸ”’ **Parallel Control** - Limit concurrent processes with `--max-parallel`
32
- - πŸ’» **Clean Output** - Structured and readable command output
33
- - πŸ›‘οΈ **Safe Shutdown** - Graceful process termination on interrupt
34
- - 🀫 **Flexible Display** - Control prefixes, timing, and output visibility
35
- - 🧰 **Node.js API** - Programmatic usage in your applications
36
26
 
37
- ## πŸš€ Installation
27
+ **Neex: A Powerful Fusion of Next.js and Express for Fullstack Development**
38
28
 
39
- Install Neex globally to use it anywhere, or locally in your project.
29
+ **Neex** is a modern and advanced fullstack framework that combines **Next.js** and **Express** to deliver an exceptional development experience. Designed for speed, simplicity, and scalability, Neex empowers developers to effortlessly build and deploy robust, high-performance applications.
40
30
 
41
- ```bash
42
- # Global install
43
- npm install -g neex
44
-
45
- # Local install
46
- npm install --save-dev neex # npm
47
- yarn add --dev neex # yarn
48
- pnpm add --save-dev neex # pnpm
49
- bun add --dev neex # bun
50
- ```
31
+ ## ✨ Why Choose Neex?
51
32
 
52
- When installed locally, you can run Neex commands using `npx neex ...` or by adding them to your `package.json` scripts.
33
+ Unlock the full potential of your fullstack projects with Neex’s powerful features, tailored for modern web development:
53
34
 
54
- ## πŸ–₯️ Usage
35
+ * πŸ—οΈ **Fullstack Architecture**: Independent codebases for **frontend (Next.js)** and **backend (Express)** with isolated dependencies for maximum flexibility.
36
+ * πŸ”„ **Monorepo Workflow**: Enjoy the simplicity of a single repository with clear separation between frontend and backend domains.
37
+ * ⚑ **Zero Configuration**: Out-of-the-box setup for **TypeScript**, **Prisma**, and **environment variable management** for instant development readiness.
38
+ * πŸ› οΈ **Production-Ready**: Built-in best practices for performance, scalability, and reliability at an enterprise level.
39
+ * πŸ“¦ **Isolated Dependencies**: Each part of the stack has its own `package.json` to ensure modular and scalable development.
40
+ * 🧩 **Separation of Concerns**: Clearly divided frontend and backend logic leads to cleaner, more maintainable codebases.
41
+ * πŸ”’ **Secure Environment Management**: Built-in support for `dotenv` to handle environment variables safely and efficiently.
42
+ * πŸ“Š **Database Integration**: Native support for **Prisma ORM** enables fast, type-safe, and efficient database development.
43
+ * πŸ› οΈ **Powerful CLI**: Intuitive CLI commands to simplify development, building, and deployment workflows.
55
44
 
56
- ```bash
57
- # Global install
58
- npm i -g neex
59
-
60
- # Local install
61
- npm i -D neex # npm
62
- yarn add -D neex # yarn
63
- pnpm add -D neex # pnpm
64
- bun add -D neex # bun
65
- ```
45
+ With these features, **Neex** is the ideal choice for developers seeking a fullstack framework that’s **SEO-optimized, scalable, efficient, and developer-friendly**. Start building high-performance web applications today with Neex’s robust toolset and clean architecture.
66
46
 
67
- ## πŸ–₯️ Usage
68
47
 
69
- ### Core Commands
70
48
 
71
- Neex provides several commands to manage and run your scripts:
72
-
73
- - **`px <commands...>`** (*default command*)
74
- - Runs specified commands in **parallel** by default.
75
- - Use the `-q` or `--sequential` flag to run them sequentially.
76
- - Ideal for build steps, tests, or any tasks that can run concurrently.
77
-
78
- - **`run <commands...>`** (alias: `s`)
79
- - Runs specified commands **sequentially**.
80
- - Useful for tasks that depend on the completion of previous ones (e.g., build then deploy).
81
-
82
- - **`servers <commands...>`** (alias: `srv`)
83
- - Optimized for running multiple development **servers** (e.g., backend API, frontend app) in parallel.
84
- - Provides grouped and clear output for each server, making it easy to monitor logs.
85
- - Detects and displays server ports and URLs.
86
-
87
- - **`watch <commands...>`** (alias: `w`)
88
- - Runs commands and **watches for file changes** to automatically restart them (Nodemon-like functionality).
89
- - Highly configurable with options for watched paths, ignored patterns, extensions, and restart delays.
90
- - Perfect for development workflows where you need instant feedback on code changes.
91
-
92
- - **Process Management Commands**
93
- - Neex provides built-in process management capabilities, similar to PM2, for long-running applications. These commands operate directly under `neex`:
94
- - **`start <script_path_or_command> [--name <name>] [--watch] [-- <args...>]`**: Start a new process.
95
- - **`stop <name_or_id>`**: Stop a running process.
96
- - **`restart <name_or_id>`**: Restart a running process.
97
- - **`delete <name_or_id>`**: Stop and delete a process from the list.
98
- - **`list`** (aliases: `ls`, `status`): List all managed processes.
99
- - **`logs [name_or_id] [--lines <number>] [--follow]`**: Display logs for a specific process or all if no ID is given.
100
- - **`monit`**: Launch a monitoring interface for all managed processes.
101
- - **`save`**: Save the current list of running processes.
102
- - **`resurrect`**: Restart processes that were previously saved.
103
- - **`startup`**: Generate a sample startup script (e.g., for systemd).
104
-
105
- ### General Command Examples
49
+ ## πŸš€ Quick Start
106
50
 
107
- ```bash
108
- # Parallel execution (default behavior for px)
109
- neex px "npm run build:api" "npm run build:frontend" "npm run lint"
110
- # px is the command for parallel execution
111
- neex px "npm run test:unit" "npm run test:integration"
51
+ ### Create a New Neex Project – Step-by-Step
112
52
 
113
- # Sequential execution
114
- neex run "npm run clean" "npm run build" "npm run deploy"
115
- # Alias for sequential
116
- neex s "echo First" "echo Second" "echo Third"
117
53
 
118
- # Run 'px' commands sequentially using the -q flag
119
- neex px -q "npm run step1" "npm run step2"
120
- ```
54
+ 1. **Run one of the creation commands**:
55
+ ```bash
56
+ npx neex init
57
+ # or
58
+ npx create-neex
59
+ ```
121
60
 
122
- ### `servers` Command Examples
61
+ 2. **Enter your project name** (e.g., `my-awesome-project`).
123
62
 
124
- ```bash
125
- # Start frontend and backend development servers
126
- neex servers "cd frontend && npm start" "cd backend && npm start"
63
+ 3. **Select your package manager**:
64
+ - npm
65
+ - yarn
66
+ - pnpm
67
+ - bun
127
68
 
128
- # Group output for better readability
129
- neex servers --group-output "npm run dev:service-a" "npm run dev:service-b"
130
- ```
69
+ 4. **Wait for the project structure to be created** automatically.
131
70
 
132
- ### `watch` Command Examples
71
+ 5. **Install dependencies**:
72
+ ```bash
73
+ cd my-project
74
+ npm install # or yarn, pnpm install, bun install
75
+ ```
133
76
 
134
- ```bash
135
- # Watch for changes in './src' and restart 'npm run build'
136
- neex watch "npm run build" -w ./src
77
+ 6. **Start development**:
78
+ ```bash
79
+ npm run dev # or yarn dev, pnpm dev, bun dev
80
+ ```
137
81
 
138
- # Watch for .ts file changes in 'services/' and restart two commands, ignoring 'node_modules'
139
- neex watch "npm run start:service1" "npm run start:service2" -w services/ -e ts,tsx -i node_modules/**
82
+ 7. **Access your project**:
83
+ - client: `http://localhost:3000`
84
+ - server: `http://localhost:8000`
140
85
 
141
- # Clear console on restart and set a delay
142
- neex watch "node server.js" --clear --delay 1500
143
- ```
86
+ ## πŸ–₯️ CLI Commands
144
87
 
145
- ### Process Management Command Examples
88
+ Neex provides a powerful CLI with commands tailored for development, building, and production deployment.
146
89
 
147
- ```bash
148
- # Start a Node.js app and give it a name
149
- neex start server.js --name my-app
90
+ ### Core Commands
150
91
 
151
- # Start an app and watch for file changes
152
- neex start api/index.js --name my-api --watch
92
+ - **`neex init`**: Initializes a new Neex project using `create-neex`.
93
+ - **`neex dev [file]`**: Starts a fast TypeScript development server with live-reloading.
94
+ - **`neex build [source]`**: Compiles TypeScript projects for production.
95
+ - **`neex start [file]`**: Starts a production-ready application with process management (PM2-like).
96
+ - **`neex p <commands...>`** (aliases: `par`, `parallel`): Runs commands in parallel.
97
+ - **`neex s <commands...>`** (aliases: `seq`, `sequential`): Runs commands sequentially.
98
+ - **`neex dev:clean`**: Cleans development cache and temporary files.
99
+ - **`neex dev:check`**: Validates TypeScript configuration.
100
+ - **`neex dev:info`**: Displays development server information.
153
101
 
154
- # List all running processes managed by neex
155
- neex list
102
+ ### Command Examples
156
103
 
157
- # View logs for 'my-app'
158
- neex logs my-app
104
+ #### Development (`dev` Command)
159
105
 
160
- # Stop 'my-api'
161
- neex stop my-api
106
+ The `dev` command provides a fast, live-reloading development environment.
162
107
 
163
- # Restart 'my-app'
164
- neex restart my-app
108
+ ```bash
109
+ # Start development server for a TypeScript file
110
+ neex dev src/index.ts
165
111
 
166
- # Delete 'my-api' from neex management
167
- neex delete my-api
168
- ```
112
+ # Watch specific directories
113
+ neex dev --watch src,public "npm run dev"
169
114
 
170
- ### `dev` Command Examples
115
+ # Ignore patterns
116
+ neex dev --ignore "*.log,dist/**" "node server.js"
171
117
 
172
- The `dev` command is designed for development environments, providing automatic file watching and restart functionality. Here are various ways to use it:
118
+ # Specify file extensions
119
+ neex dev --ext ts,tsx,js "npm run dev"
173
120
 
174
- #### 1. Automatic Usage
121
+ # Ultra-fast mode with 50ms delay
122
+ neex dev --fast "npm run dev"
123
+ ```
175
124
 
176
- When no arguments are provided, neex dev will automatically:
125
+ #### Building (`build` Command)
177
126
 
178
- - If `package.json` has a `"dev"` script:
179
- ```bash
180
- neex dev # runs: npm run dev
181
- ```
127
+ Compile TypeScript projects for production.
182
128
 
183
- - If only a `"start"` script exists:
184
- ```bash
185
- neex dev # runs: npm run start
186
- ```
129
+ ```bash
130
+ # Build project from src to dist
131
+ neex build
187
132
 
188
- - If only a `"main"` field exists:
189
- ```bash
190
- neex dev # runs: node main.js (for JavaScript)
191
- neex dev # runs: npx ts-node main.ts (for TypeScript)
192
- ```
133
+ # Build with source maps and watch mode
134
+ neex build src --sourcemap --watch
193
135
 
194
- #### 2. Direct File Execution
136
+ # Quick compilation
137
+ neex compile src
138
+ ```
195
139
 
196
- Run JavaScript or TypeScript files directly:
140
+ #### Production (`start` Command)
197
141
 
198
- ```bash
199
- # JavaScript file
200
- neex dev app.js # runs: node app.js
142
+ Run production-ready applications with advanced process management.
201
143
 
202
- # TypeScript file
203
- neex dev server.ts # runs: npx ts-node server.ts
204
144
 
205
- # ES modules
206
- neex dev index.mjs
207
145
 
208
- # CommonJS TypeScript
209
- neex dev main.cts
210
- ```
211
146
 
212
- #### 3. Package Manager Scripts
213
147
 
214
- Run npm/yarn/pnpm scripts:
215
148
 
216
149
  ```bash
217
- # npm scripts
218
- neex dev "npm run dev"
219
- neex dev "npm run start"
220
- neex dev "npm run build"
221
-
222
- # yarn scripts
223
- neex dev "yarn dev"
224
- neex dev "yarn start"
225
-
226
- # pnpm scripts
227
- neex dev "pnpm dev"
228
- neex dev "pnpm start"
229
- ```
230
-
231
- #### 4. System Commands
150
+ # Start production server
151
+ neex start dist/server.js
232
152
 
233
- Execute various system commands:
153
+ # Start with multiple workers
154
+ neex start dist/server.js --workers 4
234
155
 
235
- ```bash
236
- neex dev "python app.py"
237
- neex dev "php server.php"
238
- neex dev "go run main.go"
239
- neex dev "cargo run"
240
- neex dev "dotnet run"
156
+ # Enable health check endpoint
157
+ neex start dist/server.js --health-port 3001
241
158
  ```
242
159
 
243
- #### 5. Configuration Options
244
160
 
245
- Customize the development experience with these options:
161
+ Below is an example of `package.json` scripts for running two projects (frontend and backend) concurrently, along with ORM (Prisma) integration, tailored for a Neex project with a polyrepo-in-monorepo architecture. This example demonstrates how to use Neex commands to manage development, building, and production workflows efficiently.
246
162
 
247
- ```bash
248
- # Watch specific directories
249
- neex dev --watch src --watch public "npm run dev"
163
+ ```json
164
+ {
165
+ "scripts": {
166
+ "dev": "neex p dev:client dev:server",
167
+ "dev:client": "cd apps/client && bun run dev",
168
+ "dev:server": "cd apps/server && bun run dev",
169
+ "build": "neex s prisma:generate prisma:migrate build:client build:server",
170
+ "build:client": "cd apps/client && bun run build",
171
+ "build:server": "cd apps/server && bun run build",
172
+ "start": "neex p start:client start:server",
173
+ "start:client": "cd apps/client && bun run start",
174
+ "start:server": "cd apps/server && bun run start",
175
+ "prisma:generate": "cd apps/server && bunx prisma generate",
176
+ "prisma:migrate": "cd apps/server && bunx prisma db push"
177
+ }
178
+ }
179
+ ```
250
180
 
251
- # Ignore certain files/directories
252
- neex dev --ignore "*.log" --ignore "temp/**" "node server.js"
181
+ ### Explanation of Scripts
253
182
 
254
- # Specify file extensions
255
- neex dev --ext js,ts,vue,jsx "npm run dev"
183
+ - **`dev`**: Uses `neex p` to run the frontend (`dev:client`) and backend (`dev:server`) development servers in parallel, leveraging Neex's ability to manage concurrent processes with clear output.
184
+ - **`dev:client`**: Runs the Next.js frontend development server in the `apps/client` directory using Bun.
185
+ - **`dev:server`**: Runs the Express backend development server in the `apps/server` directory using Bun.
186
+ - **`build`**: Uses `neex s` to sequentially execute Prisma-related tasks (`prisma:generate`, `prisma:migrate`) followed by building both the frontend (`build:client`) and backend (`build:server`) projects.
187
+ - **`build:client`**: Builds the Next.js frontend in the `apps/client` directory.
188
+ - **`build:server`**: Builds the Express backend in the `apps/server` directory.
189
+ - **`start`**: Uses `neex p` to start both the frontend (`start:client`) and backend (`start:server`) in production mode concurrently, utilizing Neex's advanced process management for clustering and health checks.
190
+ - **`start:client`**: Starts the Next.js frontend in production mode.
191
+ - **`start:server`**: Starts the Express backend in production mode.
192
+ - **`prisma:generate`**: Generates the Prisma client for the backend in `apps/server`.
193
+ - **`prisma:migrate`**: Applies Prisma database migrations in `apps/server`.
256
194
 
257
- # Set restart delay
258
- neex dev --delay 2000 "npm run dev"
195
+ ### Running the Scripts
259
196
 
260
- # Clear console on restart
261
- neex dev --clear "node app.js"
197
+ ```bash
198
+ npm run dev # Starts frontend and backend development servers in parallel
199
+ npm run build # Sequentially generates Prisma client, applies migrations, and builds both projects
200
+ npm run start # Starts frontend and backend in production mode concurrently
201
+ ```
262
202
 
263
- # Minimal output
264
- neex dev --minimal "npm run dev"
203
+ Below is an example of `package.json` scripts for running two projects (frontend and backend) concurrently, along with ORM (Prisma) integration, tailored for a Neex project. This example demonstrates how to use Neex commands to manage development, building, and production workflows efficiently.
265
204
 
266
- # Disable colors
267
- neex dev --no-color "npm run dev"
205
+ ```json
206
+ {
207
+ "scripts": {
208
+ "dev": "neex p dev:client dev:server",
209
+ "dev:client": "cd apps/client && bun run dev",
210
+ "dev:server": "cd apps/server && bun run dev",
211
+ "build": "neex s prisma:generate prisma:migrate build:client build:server",
212
+ "build:client": "cd apps/client && bun run build",
213
+ "build:server": "cd apps/server && bun run build",
214
+ "start": "neex p start:client start:server",
215
+ "start:client": "cd apps/client && bun run start",
216
+ "start:server": "cd apps/server && bun run start",
217
+ "prisma:generate": "cd apps/server && bunx prisma generate",
218
+ "prisma:migrate": "cd apps/server && bunx prisma db push"
219
+ }
220
+ }
221
+ ```
268
222
 
269
- # Disable timing display
270
- neex dev --no-timing "npm run dev"
271
223
 
272
- # Stop on first error
273
- neex dev --stop-on-error "npm run test"
274
- ```
224
+ #### Parallel and Sequential Execution
275
225
 
276
- #### 6. Framework-Specific Examples
226
+ Run multiple scripts efficiently.
277
227
 
278
228
  ```bash
279
- # Express.js
280
- neex dev server.js
229
+ # Parallel execution
230
+ neex p "npm run build:frontend" "npm run build:backend"
281
231
 
282
- # Fastify
283
- neex dev --watch src "npm run dev"
232
+ # Sequential execution
233
+ neex s "npm run clean" "npm run build" "npm run deploy"
284
234
 
285
- # Nest.js
286
- neex dev --watch src --ext ts "npm run start:dev"
235
+ # Parallel with sequential flag
236
+ neex p -q "npm run step1" "npm run step2"
237
+ ```
287
238
 
288
- # Koa.js
289
- neex dev --watch app --ext js "node app.js"
239
+ ## πŸ“‚ Project Structure
290
240
 
291
- # Electron
292
- neex dev --watch src --ext js,html "npm run electron"
241
+ Neex creates a polyrepo-in-monorepo structure for clear separation and scalability:
293
242
 
294
- # Webpack Dev Server
295
- neex dev --watch src --ext js,css,html "npm run dev"
243
+ ```
244
+ my-project/
245
+ β”œβ”€β”€ .env # Root environment variables
246
+ β”œβ”€β”€ apps/
247
+ β”‚ β”œβ”€β”€ client/ # Next.js frontend project
248
+ β”‚ β”‚ β”œβ”€β”€ src/
249
+ β”‚ β”‚ β”‚ β”œβ”€β”€ app/ # Next.js App Router
250
+ β”‚ β”‚ β”‚ └── ...
251
+ β”‚ β”‚ β”œβ”€β”€ next.config.ts
252
+ β”‚ β”‚ β”œβ”€β”€ package.json # Frontend dependencies
253
+ β”‚ β”‚ └── tsconfig.json
254
+ β”‚ └── server/ # Express backend project
255
+ β”‚ β”œβ”€β”€ src/
256
+ β”‚ β”‚ β”œβ”€β”€ server.ts # Express server entry
257
+ β”‚ β”‚ └── ...
258
+ β”‚ β”œβ”€β”€ package.json # Backend dependencies
259
+ β”‚ └── tsconfig.json
260
+ β”œβ”€β”€ package.json # Root orchestration
261
+ └── README.md
296
262
  ```
297
263
 
298
- #### 7. Error Handling
264
+ Each `apps/client` and `apps/server` directory is a fully independent project that can be extracted into its own repository if needed, while benefiting from a unified monorepo workflow.
299
265
 
300
- ```bash
301
- # No command specified and no default script
302
- neex dev
303
- # Error: No command specified for 'neex dev' and no default script
266
+ ## βš™οΈ Advanced Options
304
267
 
305
- # Non-existent file
306
- neex dev nonexistent.js
307
- # Warning: File "nonexistent.js" not found. Attempting to run as command.
308
- ```
268
+ ### `neex init`
309
269
 
310
- ### πŸ“š Examples
270
+ ```bash
271
+ # Create in current directory
272
+ npx create-neex@latest .
311
273
 
312
- ### Parallel Execution
274
+ # Create with specific name
275
+ npx create-neex@latest my-project
313
276
 
314
- ```bash
315
- # Parallel execution (default behavior for p)
316
- neex p "npm run build:api" "npm run build:frontend" "npm run lint"
317
- neex par "npm run test:unit" "npm run test:integration"
318
- neex parallel "npm run test:frontend" "npm run test:backend"
277
+ # Enable debug mode
278
+ npx create-neex@latest my-project --debug
319
279
  ```
320
280
 
321
- ### Sequential Execution
281
+ ### `neex dev`
322
282
 
323
283
  ```bash
324
- # Sequential execution using s command
325
- neex s "npm run clean" "npm run build" "npm run deploy"
326
- neex seq "echo First" "echo Second" "echo Third"
327
- neex sequential "npm run step1" "npm run step2" "npm run step3"
328
- ```
284
+ # Custom restart delay
285
+ neex dev --delay 2000 "npm run dev"
329
286
 
330
- ### Parallel with Sequential Flag
287
+ # Disable console clearing
288
+ neex dev --no-clear "node app.js"
331
289
 
332
- ```bash
333
- # Run parallel commands sequentially using the -q flag
334
- neex p -q "npm run step1" "npm run step2"
335
- neex par -q "npm run build" "npm run test"
336
- neex parallel -q "npm run lint" "npm run format"
290
+ # Framework-specific example (Nest.js)
291
+ neex dev --watch src --ext ts "npm run start:dev"
337
292
  ```
338
293
 
339
- ### Advanced Options
294
+ ### `neex build`
340
295
 
341
296
  ```bash
342
- # With retry options
343
- neex p --retry 3 --retry-delay 1000 "npm run test"
297
+ # Custom output directory
298
+ neex build src --output build
344
299
 
345
- # With output control
346
- neex s --no-color --no-timing --no-output "npm run build"
300
+ # Specify TypeScript target
301
+ neex build src --target es2022
347
302
 
348
- # With parallel limits
349
- neex p --max-parallel 2 "npm run build:frontend" "npm run build:backend" "npm run build:api"
303
+ # Analyze bundle size
304
+ neex build src --analyze
350
305
  ```
351
306
 
352
- ### Advanced Example
307
+ ### `neex start`
353
308
 
354
309
  ```bash
355
- # Run tests & build with max 2 parallel tasks, stop on error
356
- neex p -s -m 2 -t "npm test" "npm run build" "npm run lint"
357
- ```
310
+ # Custom port
311
+ neex start dist/server.js --port 8080
358
312
 
359
- ## πŸ“¦ Node.js API
360
-
361
- ```javascript
362
- import { run } from 'neex';
363
- // or: const { run } = require('neex');
364
-
365
- async function main() {
366
- try {
367
- // Sequential execution
368
- await run(['echo Step 1', 'echo Step 2'], {
369
- parallel: false,
370
- stopOnError: true,
371
- color: true
372
- });
373
-
374
- // Parallel execution (max 2)
375
- await run(['npm test', 'npm run build'], {
376
- parallel: true,
377
- maxParallel: 2,
378
- stopOnError: true
379
- });
380
- } catch (error) {
381
- console.error('Failed:', error);
382
- process.exit(1);
383
- }
384
- }
385
- ```
313
+ # Enable Node.js inspector
314
+ neex start dist/server.js --inspect
386
315
 
387
- ### API Options (`RunOptions`)
388
-
389
- When using Neex programmatically, you can pass an options object to the `run` function:
390
-
391
- ```typescript
392
- export interface RunOptions {
393
- // Run in parallel or sequentially
394
- parallel: boolean;
395
- // Maximum number of parallel processes (default: CPU count)
396
- maxParallel?: number;
397
- // Show command output (default: true)
398
- printOutput: boolean;
399
- // Color output (default: true)
400
- color: boolean;
401
- // Show timing information (default: true)
402
- showTiming: boolean;
403
- // Show command prefix (default: true)
404
- prefix: boolean;
405
- // Stop on error (default: false)
406
- stopOnError: boolean;
407
- // Use minimal output format (default: false)
408
- minimalOutput: boolean;
409
- // Group output by command (default: false, mainly for server mode)
410
- groupOutput: boolean;
411
- // Use server mode formatting (default: false)
412
- isServerMode: boolean;
413
- // Number of times to retry a failed command (default: 0)
414
- retry?: number;
415
- // Delay in milliseconds between retries (default: 1000)
416
- retryDelay?: number;
417
- // Callback to register a cleanup function, called on SIGINT/SIGTERM
418
- registerCleanup?: (cleanupFn: () => void) => void;
419
- }
316
+ # Set memory limit
317
+ neex start dist/server.js --max-memory 1G
420
318
  ```
421
319
 
422
- ## πŸ”„ CI/CD Integration
423
-
424
- ```yaml
425
- # GitHub Actions example
426
- steps:
427
- - name: Test & Build
428
- run: neex s -s "npm test" "npm run build"
429
320
 
430
- - name: Parallel Tasks
431
- run: neex p -s -m 4 "npm run lint" "npm test" "npm run e2e"
432
- ```
433
321
 
434
- ## πŸ’‘ Real-world Scenarios & `package.json` Integration
435
322
 
436
- Neex shines when integrated into your `package.json` scripts.
323
+ ## πŸ’‘ Real-World Scenarios
437
324
 
438
- **Example `package.json` scripts:**
325
+ Integrate Neex into your `package.json` for a seamless workflow:
439
326
 
440
327
  ```json
441
328
  {
442
329
  "scripts": {
443
- "dev:frontend": "cd packages/frontend && npm run dev",
444
- "dev:backend": "cd packages/api && npm run dev",
445
- "dev": "neex servers \"npm run dev:frontend\" \"npm run dev:backend\" --group-output",
446
-
447
- "build:ui": "cd packages/ui-library && npm run build",
448
- "build:app": "cd packages/main-app && npm run build",
449
- "build": "neex runx \"npm run build:ui\" \"npm run build:app\"",
450
-
451
- "test": "neex runx -s \"npm run test:unit\" \"npm run test:e2e\"",
452
- "test:unit": "jest",
453
- "test:e2e": "playwright test",
454
-
455
- "lint": "eslint .",
456
- "format": "prettier --write .",
457
- "check-all": "neex p \"npm run lint\" \"npm run format -- --check\" \"npm run test\"",
458
-
459
- "start:prod": "neex pm2 start dist/server.js --name my-prod-app",
460
- "watch:build": "neex watch \"npm run build:app\" -w packages/main-app/src -e ts,tsx"
330
+ "dev": "neex dev src/server.ts",
331
+ "build": "neex build",
332
+ "start": "neex start"
461
333
  }
462
334
  }
463
335
  ```
464
336
 
465
- **Running these scripts:**
337
+ Run scripts with:
466
338
 
467
339
  ```bash
468
- # Start all development servers with grouped output
469
- npm run dev
470
-
471
- # Build UI library and main application in parallel
472
- npm run build
340
+ npm run dev # Start development server with live-reloading
341
+ npm run build # Compile TypeScript project for production
342
+ npm run start # Start production server
343
+ ```
473
344
 
474
- # Run linters, format check, and all tests in parallel
475
- npm run check-all
345
+ This configuration provides a minimal yet effective setup for developing, building, and deploying your Neex project. The `dev` command runs a TypeScript development server, `build` compiles the project, and `start` launches the production application.
476
346
 
477
- # Start the production application using neex's pm2
478
- npm run start:prod
347
+ ## πŸ“‹ System Requirements
479
348
 
480
- # Watch for changes in the main app's src and rebuild it
481
- npm run watch:build
482
- ```
349
+ - **Node.js**: 20.0.0 or later
350
+ - **OS**: macOS, Windows, or Linux
351
+ - **Package Manager**: npm, yarn, pnpm, or bun
483
352
 
484
353
  ## 🀝 Contributing
485
354
 
486
- We welcome contributions! Check our [issues page](https://github.com/Neexjs).
355
+ Contributions are welcome! Visit our [GitHub issues page](https://github.com/Neexjs) to get started.
487
356
 
488
357
  ## πŸ“„ License
489
358
 
490
- MIT
359
+ MIT License. See [LICENSE](https://github.com/neexjs/blob/main/LICENSE) for details.
@@ -0,0 +1 @@
1
+ "use strict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neex",
3
- "version": "0.6.99",
3
+ "version": "0.7.2",
4
4
  "description": "The Modern Build System for Polyrepo-in-Monorepo Architecture",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -19,13 +19,22 @@
19
19
  "test:sequence": "node ./dist/src/cli.js run \"echo Step 1\" \"echo Step 2\" \"echo Step 3\""
20
20
  },
21
21
  "keywords": [
22
- "npm",
23
- "run",
24
- "script",
25
- "parallel",
26
- "sequential",
27
- "command",
28
- "cli"
22
+ "fullstack-framework",
23
+ "nextjs",
24
+ "express",
25
+ "monorepo",
26
+ "polyrepo",
27
+ "typescript",
28
+ "prisma",
29
+ "cli",
30
+ "build-system",
31
+ "web-development",
32
+ "node",
33
+ "javascript",
34
+ "production-ready",
35
+ "dotenv",
36
+ "parallel-execution",
37
+ "sequential-execution"
29
38
  ],
30
39
  "author": "foshati",
31
40
  "license": "MIT",
@@ -51,10 +60,10 @@
51
60
  "typescript": "^4.9.3"
52
61
  },
53
62
  "engines": {
54
- "node": ">=18.0.0"
63
+ "node": ">=20.0.0"
55
64
  },
56
65
  "repository": {
57
66
  "type": "git",
58
67
  "url": "https://github.com/Neexjs"
59
68
  }
60
- }
69
+ }