evophp 1.0.4 → 1.0.5

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/installer.js +9 -3
  2. package/package.json +1 -1
package/installer.js CHANGED
@@ -18,7 +18,9 @@ let [, , command, type, name] = process.argv;
18
18
 
19
19
  console.log(`Installing plugin/theme: ${name}...`);
20
20
  try {
21
- execSync(`node ./install-plugin.js ${type} ${name}`, {
21
+ const globalPath = require.resolve("evophp");
22
+ const pluginPath = path.resolve(path.dirname(globalPath), "install-plugin.js");
23
+ execSync(`node ${pluginPath} ${type} ${name}`, {
22
24
  stdio: "inherit",
23
25
  });
24
26
  } catch (error) {
@@ -43,7 +45,9 @@ let [, , command, type, name] = process.argv;
43
45
 
44
46
  console.log(`Creating a new ${type}: ${name}...`);
45
47
  try {
46
- execSync(`node ./new-plugin.js ${type} ${name}`, { stdio: "inherit" });
48
+ const globalPath = require.resolve("evophp");
49
+ const pluginPath = path.resolve(path.dirname(globalPath), "new-plugin.js");
50
+ execSync(`node ${pluginPath} ${type} ${name}`, { stdio: "inherit" });
47
51
  } catch (error) {
48
52
  console.error(`Error creating new ${type}: ${error.message}`);
49
53
  process.exit(1);
@@ -58,7 +62,9 @@ let [, , command, type, name] = process.argv;
58
62
 
59
63
  if (type === "plugin") {
60
64
  try {
61
- execSync(`node install-dependencies.js ${name} ${args.join(' ')}`, { stdio: "inherit" });
65
+ const globalPath = require.resolve("evophp");
66
+ const pluginPath = path.resolve(path.dirname(globalPath), "install-dependencies.js");
67
+ execSync(`node ${pluginPath} ${name} ${args.join(' ')}`, { stdio: "inherit" });
62
68
  } catch (error) {
63
69
  console.error(`Error installing dependencies: ${error.message}`);
64
70
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evophp",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Installer for the Evolution PHP project",
5
5
  "main": "installer.js",
6
6
  "scripts": {