toon-memory 1.0.0 → 1.0.1
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/setup.js +9 -3
- package/package.json +1 -1
package/bin/setup.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { existsSync, mkdirSync, copyFileSync, readFileSync, writeFileSync } from "fs"
|
|
4
4
|
import { join, dirname } from "path"
|
|
5
5
|
import { fileURLToPath } from "url"
|
|
6
|
+
import { execSync } from "child_process"
|
|
6
7
|
|
|
7
8
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
8
9
|
const PROJECT_ROOT = process.cwd()
|
|
@@ -44,14 +45,19 @@ function main() {
|
|
|
44
45
|
console.log(` ✅ Skill: ${SKILL_FILE}`)
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
// 4.
|
|
48
|
+
// 4. Install @toon-format/toon if not present
|
|
48
49
|
const pkgPath = join(PROJECT_ROOT, "package.json")
|
|
49
50
|
if (existsSync(pkgPath)) {
|
|
50
51
|
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"))
|
|
51
52
|
const deps = { ...pkg.dependencies, ...pkg.devDependencies }
|
|
52
53
|
if (!deps["@toon-format/toon"]) {
|
|
53
|
-
console.log("\n
|
|
54
|
-
|
|
54
|
+
console.log("\n 📦 Installing @toon-format/toon...")
|
|
55
|
+
try {
|
|
56
|
+
execSync("npm install @toon-format/toon", { cwd: PROJECT_ROOT, stdio: "inherit" })
|
|
57
|
+
console.log(" ✅ @toon-format/toon installed")
|
|
58
|
+
} catch {
|
|
59
|
+
console.log(" ⚠️ Failed to install. Run manually: npm install @toon-format/toon")
|
|
60
|
+
}
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
63
|
|