evophp 1.0.0 → 1.0.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/installer.js +7 -4
- package/package.json +2 -2
package/installer.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
1
3
|
const { execSync } = require("child_process");
|
|
2
4
|
const path = require("path");
|
|
3
5
|
const fs = require("fs");
|
|
4
6
|
|
|
5
7
|
(async () => {
|
|
6
8
|
try {
|
|
9
|
+
// Get the project name from command-line arguments or use a default value
|
|
7
10
|
const projectName = process.argv[2] || "evolution-project";
|
|
8
11
|
|
|
9
12
|
// Clone the repository
|
|
@@ -14,11 +17,11 @@ const fs = require("fs");
|
|
|
14
17
|
const projectPath = path.join(process.cwd(), projectName);
|
|
15
18
|
process.chdir(projectPath);
|
|
16
19
|
|
|
17
|
-
// Run `node evolution`
|
|
18
|
-
console.log(
|
|
19
|
-
execSync(
|
|
20
|
+
// Run `node evolution` with the project name passed as an argument
|
|
21
|
+
console.log(`Running node evolution for project: ${projectName}...`);
|
|
22
|
+
execSync(`node evolution ${projectName}`, { stdio: "inherit" });
|
|
20
23
|
|
|
21
|
-
// Run `composer install`
|
|
24
|
+
// Run `composer install` if composer.json exists
|
|
22
25
|
if (fs.existsSync("composer.json")) {
|
|
23
26
|
console.log("Installing Composer dependencies...");
|
|
24
27
|
execSync("composer install", { stdio: "inherit" });
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evophp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Installer for the Evolution PHP project",
|
|
5
5
|
"main": "installer.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "node installer.js"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
|
-
"
|
|
10
|
+
"evophp": "./installer.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {}
|
|
13
13
|
}
|