pjdev2d-cli 1.0.3 → 1.0.4
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/bin/pjdev2d-cli.js +3 -2
- package/package.json +1 -1
package/bin/pjdev2d-cli.js
CHANGED
|
@@ -4,10 +4,11 @@ import { Command } from "commander";
|
|
|
4
4
|
import fs from "fs-extra";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
|
-
import registry from "../registry.json";
|
|
8
7
|
|
|
9
8
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
9
|
const __dirname = path.dirname(__filename);
|
|
10
|
+
const registryPath = path.join(__dirname, "..", "registry.json");
|
|
11
|
+
const registry = await fs.readJson(registryPath);
|
|
11
12
|
|
|
12
13
|
const program = new Command();
|
|
13
14
|
|
|
@@ -25,7 +26,7 @@ program
|
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
const sourcePath = path.join(__dirname, "..", item.
|
|
29
|
+
const sourcePath = path.join(__dirname, "..", item.files[0]);
|
|
29
30
|
|
|
30
31
|
if (!fs.existsSync(sourcePath)) {
|
|
31
32
|
console.log(`❌ Missing template: ${item.path}`);
|