@silvery/examples 0.4.3 → 0.4.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/cli.ts +8 -1
- package/package.json +1 -1
package/bin/cli.ts
CHANGED
|
@@ -258,11 +258,18 @@ async function main(): Promise<void> {
|
|
|
258
258
|
const args = process.argv.slice(2)
|
|
259
259
|
|
|
260
260
|
// Top-level flags
|
|
261
|
-
if (args.includes("--help") || args.includes("-h")
|
|
261
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
262
262
|
printHelp()
|
|
263
263
|
return
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
+
// No args → list examples
|
|
267
|
+
if (args.length === 0) {
|
|
268
|
+
const examples = await discoverExamples()
|
|
269
|
+
printExampleList(examples)
|
|
270
|
+
return
|
|
271
|
+
}
|
|
272
|
+
|
|
266
273
|
if (args.includes("--version") || args.includes("-v")) {
|
|
267
274
|
try {
|
|
268
275
|
const { resolve } = await import("node:path")
|
package/package.json
CHANGED