neex 0.6.68 → 0.6.70

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/src/cli.js CHANGED
@@ -18,6 +18,7 @@ function cli() {
18
18
  .description('Professional script runner with nodemon and PM2 functionality')
19
19
  .version(version);
20
20
  // Add all command groups
21
+ (0, index_js_1.addInitCommand)(program);
21
22
  (0, index_js_1.addRunCommands)(program);
22
23
  (0, index_js_1.addServerCommands)(program);
23
24
  const devCommands = (0, index_js_1.addDevCommands)(program);
@@ -20,3 +20,4 @@ __exportStar(require("./dev-commands.js"), exports);
20
20
  __exportStar(require("./server-commands.js"), exports);
21
21
  __exportStar(require("./start-commands.js"), exports);
22
22
  __exportStar(require("./build-commands"), exports);
23
+ __exportStar(require("./init-commands.js"), exports);
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.addInitCommand = void 0;
7
+ const child_process_1 = require("child_process");
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ const figures_1 = __importDefault(require("figures"));
10
+ function addInitCommand(program) {
11
+ program
12
+ .command('init')
13
+ .description('Initialize a new neex project by running `npx create-neex`')
14
+ .action(() => {
15
+ console.log(chalk_1.default.green(`${figures_1.default.pointer} Running npx create-neex...`));
16
+ const command = 'npx';
17
+ const args = ['create-neex'];
18
+ // Use spawn to execute the command and stream the output
19
+ const child = (0, child_process_1.spawn)(command, args, {
20
+ stdio: 'inherit',
21
+ shell: true // Needed for 'npx' on some systems, especially Windows
22
+ });
23
+ child.on('close', (code) => {
24
+ if (code !== 0) {
25
+ console.error(chalk_1.default.red(`${figures_1.default.cross} Error initializing project. 'npx create-neex' exited with code ${code}`));
26
+ }
27
+ else {
28
+ console.log(chalk_1.default.green(`${figures_1.default.tick} Project initialized successfully!`));
29
+ }
30
+ });
31
+ child.on('error', (error) => {
32
+ console.error(chalk_1.default.red(`${figures_1.default.cross} Failed to start command: ${error.message}`));
33
+ });
34
+ });
35
+ }
36
+ exports.addInitCommand = addInitCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neex",
3
- "version": "0.6.68",
3
+ "version": "0.6.70",
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",