@crvy/strybk 0.0.3 → 0.0.5

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/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.0.5] - 2026-07-06
9
+
10
+ ### Added
11
+
12
+ - **cli:** Add --help/-h flag to print usage and exit 0
13
+ ## [0.0.4] - 2026-07-03
14
+
15
+ ### Other
16
+
17
+ - Update README.md
8
18
  ## [0.0.3] - 2026-06-18
9
19
 
10
20
  ### Added
package/README.md CHANGED
@@ -1,23 +1,11 @@
1
- # strybk
1
+ # @crvy/strybk
2
2
 
3
3
  Generator-first Playwright screenshot testing for Storybook.
4
4
 
5
- ## Development
6
-
7
- Install dependencies with Bun:
8
-
9
- ```sh
10
- bun install
11
- ```
12
-
13
- Common local commands:
5
+ ## Installation
14
6
 
15
7
  ```sh
16
- bun run lint
17
- bun run typecheck
18
- bun run test:bun
19
- bun run build
20
- bun run check
8
+ npm install --save-dev @crvy/strybk
21
9
  ```
22
10
 
23
11
  ## CLI
@@ -93,3 +81,21 @@ If you want to persist the link in the consumer's manifest, Bun supports a `link
93
81
  }
94
82
  }
95
83
  ```
84
+
85
+ ## Development
86
+
87
+ Install dependencies with Bun:
88
+
89
+ ```sh
90
+ bun install
91
+ ```
92
+
93
+ Common local commands:
94
+
95
+ ```sh
96
+ bun run lint
97
+ bun run typecheck
98
+ bun run test:bun
99
+ bun run build
100
+ bun run check
101
+ ```
package/dist/src/cli.d.ts CHANGED
@@ -4,6 +4,9 @@ export interface GenerateCliArgs {
4
4
  configPath: string;
5
5
  dryRun: boolean;
6
6
  }
7
+ export declare const HELP_TEXT = "Usage: crvy-strybk generate --config <path> [options]\n\nGenerate Playwright screenshot spec files from a running Storybook index.\n\nThe Storybook server must be running at the configured `storybookUrl` so that\nindex.json can be fetched at generate time.\n\nOptions:\n --config <path> Path to strybk.config.ts (required)\n --dry-run Compute outputs without writing files\n -h, --help Show this help message\n";
8
+ export declare function printHelp(): void;
9
+ export declare function wantsHelp(argv: string[]): boolean;
7
10
  export declare function parseCliArgs(argv: string[]): GenerateCliArgs;
8
11
  export declare function runCli(argv: string[]): Promise<Array<{
9
12
  outputPath: string;
package/dist/src/cli.js CHANGED
@@ -99,6 +99,24 @@ const writeGeneratedFiles = (outputs) => {
99
99
  writeFileSync(output.outputPath, output.content);
100
100
  }
101
101
  };
102
+ export const HELP_TEXT = `Usage: crvy-strybk generate --config <path> [options]
103
+
104
+ Generate Playwright screenshot spec files from a running Storybook index.
105
+
106
+ The Storybook server must be running at the configured \`storybookUrl\` so that
107
+ index.json can be fetched at generate time.
108
+
109
+ Options:
110
+ --config <path> Path to strybk.config.ts (required)
111
+ --dry-run Compute outputs without writing files
112
+ -h, --help Show this help message
113
+ `;
114
+ export function printHelp() {
115
+ console.log(HELP_TEXT);
116
+ }
117
+ export function wantsHelp(argv) {
118
+ return argv.includes("--help") || argv.includes("-h");
119
+ }
102
120
  export function parseCliArgs(argv) {
103
121
  const [command, ...options] = argv;
104
122
  if (command !== "generate") {
@@ -155,6 +173,10 @@ export async function runCli(argv) {
155
173
  return outputs;
156
174
  }
157
175
  export async function main(argv = process.argv.slice(2)) {
176
+ if (wantsHelp(argv)) {
177
+ printHelp();
178
+ return;
179
+ }
158
180
  try {
159
181
  const outputs = await runCli(argv);
160
182
  const dryRun = argv.includes("--dry-run");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crvy/strybk",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Generator-first Playwright screenshot testing for Storybook.",
5
5
  "keywords": [
6
6
  "crvy",