@pavp/storywright 1.10.1 → 1.11.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pavp/storywright",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "description": "PM Skills pack for Claude Code — turn ambiguous inputs (prompts, screenshots, Figma links) into Jira-ready user stories.",
5
5
  "keywords": [
6
6
  "claude",
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { homedir } from "node:os";
3
- import { cp, mkdir, readdir, rm, unlink } from "node:fs/promises";
3
+ import { cp, mkdir, readdir, readFile, rm, unlink, writeFile } from "node:fs/promises";
4
4
  import { join } from "node:path";
5
+ import { execSync } from "node:child_process";
5
6
  import { REPO_ROOT, SKILLS_DIR, pathExists } from "./lib/skills.mjs";
6
7
 
7
8
  const skillsTarget = join(homedir(), ".claude", "skills", "storywright");
@@ -40,7 +41,33 @@ async function installCommands() {
40
41
  console.log(`✓ Installed slash commands to ${commandsDir} (prefix: ${COMMAND_PREFIX})`);
41
42
  }
42
43
 
44
+ async function ensureGlobalGitignore() {
45
+ let globalIgnorePath;
46
+ try {
47
+ globalIgnorePath = execSync("git config --global core.excludesFile", { encoding: "utf8" }).trim();
48
+ } catch {
49
+ globalIgnorePath = join(homedir(), ".gitignore_global");
50
+ execSync(`git config --global core.excludesFile "${globalIgnorePath}"`);
51
+ }
52
+ if (globalIgnorePath.startsWith("~")) {
53
+ globalIgnorePath = join(homedir(), globalIgnorePath.slice(2));
54
+ }
55
+
56
+ let content = "";
57
+ try { content = await readFile(globalIgnorePath, "utf8"); } catch { /* doesn't exist yet */ }
58
+
59
+ const entry = "docs/storywright/";
60
+ if (content.includes(entry)) {
61
+ console.log(`• Global gitignore already has ${entry}`);
62
+ return;
63
+ }
64
+
65
+ await writeFile(globalIgnorePath, content + `\n# storywright output\n${entry}\n`, "utf8");
66
+ console.log(`✓ Added ${entry} to ${globalIgnorePath}`);
67
+ }
68
+
43
69
  async function main() {
70
+ await ensureGlobalGitignore();
44
71
  await installSkills();
45
72
  await installCommands();
46
73
  console.log(` Restart Claude Code for changes to be picked up.`);