@wbern/claude-instructions 1.19.0 → 1.20.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/README.md +2 -0
- package/bin/cli.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -80,6 +80,8 @@ This ensures commands are regenerated whenever anyone runs `npm install`, `pnpm
|
|
|
80
80
|
| `--update-existing` | Only update already-installed commands |
|
|
81
81
|
| `--overwrite` | Overwrite conflicting files without prompting |
|
|
82
82
|
| `--skip-on-conflict` | Skip conflicting files without prompting |
|
|
83
|
+
| `--help, -h` | Show help message |
|
|
84
|
+
| `--version, -v` | Show version number |
|
|
83
85
|
|
|
84
86
|
## Customizing Commands
|
|
85
87
|
|
package/bin/cli.js
CHANGED
|
@@ -113,6 +113,7 @@ var require_picocolors = __commonJS({
|
|
|
113
113
|
|
|
114
114
|
// scripts/bin.ts
|
|
115
115
|
init_esm_shims();
|
|
116
|
+
import { createRequire } from "module";
|
|
116
117
|
|
|
117
118
|
// scripts/cli.ts
|
|
118
119
|
init_esm_shims();
|
|
@@ -790,6 +791,7 @@ function generateHelpText() {
|
|
|
790
791
|
);
|
|
791
792
|
}
|
|
792
793
|
lines.push(" --help, -h Show this help message");
|
|
794
|
+
lines.push(" --version, -v Show version number");
|
|
793
795
|
return lines.join("\n");
|
|
794
796
|
}
|
|
795
797
|
|
|
@@ -1119,6 +1121,11 @@ Happy TDD'ing!`
|
|
|
1119
1121
|
}
|
|
1120
1122
|
|
|
1121
1123
|
// scripts/bin.ts
|
|
1124
|
+
function getVersion() {
|
|
1125
|
+
const require2 = createRequire(import.meta.url);
|
|
1126
|
+
const packageJson = require2("../package.json");
|
|
1127
|
+
return packageJson.version;
|
|
1128
|
+
}
|
|
1122
1129
|
function parseArgs(argv) {
|
|
1123
1130
|
const args = {};
|
|
1124
1131
|
const booleanOpts = CLI_OPTIONS.filter((o) => o.type === "boolean");
|
|
@@ -1150,6 +1157,10 @@ async function run(argv) {
|
|
|
1150
1157
|
console.log(generateHelpText());
|
|
1151
1158
|
return;
|
|
1152
1159
|
}
|
|
1160
|
+
if (argv.includes("--version") || argv.includes("-v")) {
|
|
1161
|
+
console.log(getVersion());
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1153
1164
|
const args = parseArgs(argv);
|
|
1154
1165
|
await main(args);
|
|
1155
1166
|
}
|