rtgl 0.0.11-rc17 → 0.0.11-rc19

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.
Files changed (2) hide show
  1. package/cli.js +29 -1
  2. package/package.json +3 -3
package/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { build, scaffold, watch, examples } from "@rettangoli/fe/cli";
4
4
  import { generate, report, accept } from "@rettangoli/vt/cli";
5
- import { buildSite } from "@rettangoli/sites/cli";
5
+ import { buildSite, watchSite, screenshotCommand } from "@rettangoli/sites/cli";
6
6
  import { buildSvg } from "@rettangoli/ui/cli";
7
7
  import { Command } from "commander";
8
8
  import { readFileSync, existsSync } from "fs";
@@ -253,6 +253,34 @@ sitesCommand
253
253
  console.log("Build completed successfully!");
254
254
  });
255
255
 
256
+ sitesCommand
257
+ .command("watch")
258
+ .description("Watch and rebuild site on changes")
259
+ .option("-p, --port <port>", "The port to use", parseInt, 3001)
260
+ .option("-r, --rootDir <path>", "Path to root directory", ".")
261
+ .option("-s, --screenshots", "Enable automatic screenshot capture on page changes", false)
262
+ .action(async (options) => {
263
+ console.log("Starting watch mode with options:", options);
264
+ watchSite({
265
+ port: options.port,
266
+ rootDir: options.rootDir,
267
+ screenshots: options.screenshots,
268
+ });
269
+ });
270
+
271
+ sitesCommand
272
+ .command("screenshot")
273
+ .description("Capture screenshots of all pages")
274
+ .option("-p, --port <port>", "The port to use for temp server", parseInt, 3001)
275
+ .option("-r, --rootDir <path>", "Path to root directory", ".")
276
+ .action(async (options) => {
277
+ console.log("Capturing screenshots with options:", options);
278
+ await screenshotCommand({
279
+ port: options.port,
280
+ rootDir: options.rootDir,
281
+ });
282
+ });
283
+
256
284
  const uiCommand = program.command("ui").description("UI component tools");
257
285
 
258
286
  uiCommand
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rtgl",
3
- "version": "0.0.11-rc17",
3
+ "version": "0.0.11-rc19",
4
4
  "description": "CLI tool for Rettangoli - A frontend framework and development toolkit",
5
5
  "type": "module",
6
6
  "bin": {
@@ -48,8 +48,8 @@
48
48
  "commander": "^14.0.0",
49
49
  "js-yaml": "^4.1.0",
50
50
  "@rettangoli/fe": "0.0.7-rc14",
51
- "@rettangoli/sites": "0.2.0-rc2",
51
+ "@rettangoli/sites": "0.2.0-rc4",
52
52
  "@rettangoli/vt": "0.0.2-rc3",
53
- "@rettangoli/ui": "0.1.2-rc30"
53
+ "@rettangoli/ui": "0.1.2-rc31"
54
54
  }
55
55
  }