rtgl 0.0.35 → 0.0.38
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/cli.js +26 -4
- package/package.json +4 -4
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, watchSite, screenshotCommand } from "@rettangoli/sites/cli";
|
|
5
|
+
import { buildSite, watchSite, screenshotCommand, initSite } 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";
|
|
@@ -195,8 +195,11 @@ vtCommand
|
|
|
195
195
|
.command("generate")
|
|
196
196
|
.description("Generate visualizations")
|
|
197
197
|
.option("--skip-screenshots", "Skip screenshot generation")
|
|
198
|
-
.option("--screenshot-wait-time <time>", "Wait time between screenshots",parseInt, 0)
|
|
198
|
+
.option("--screenshot-wait-time <time>", "Wait time between screenshots", parseInt, 0)
|
|
199
|
+
.option("--concurrency <number>", "Number of concurrent screenshots", parseInt, 12)
|
|
200
|
+
.option("--wait-event <name>", "Custom event name to wait for instead of networkidle (e.g., vt:ready)")
|
|
199
201
|
.action((options) => {
|
|
202
|
+
console.log(`rtgl v${packageJson.version}`);
|
|
200
203
|
const config = readConfig();
|
|
201
204
|
|
|
202
205
|
if (!config) {
|
|
@@ -212,7 +215,10 @@ vtCommand
|
|
|
212
215
|
vtCommand
|
|
213
216
|
.command("report")
|
|
214
217
|
.description("Create reports")
|
|
215
|
-
.
|
|
218
|
+
.option("--compare-method <method>", "Comparison method: pixelmatch or md5", "pixelmatch")
|
|
219
|
+
.option("--color-threshold <number>", "Color threshold for pixelmatch (0-1)", parseFloat, 0.1)
|
|
220
|
+
.option("--diff-threshold <number>", "Max diff pixels percentage to pass (0-100)", parseFloat, 0.3)
|
|
221
|
+
.action((options) => {
|
|
216
222
|
const config = readConfig();
|
|
217
223
|
|
|
218
224
|
if (!config) {
|
|
@@ -220,7 +226,12 @@ vtCommand
|
|
|
220
226
|
}
|
|
221
227
|
|
|
222
228
|
const vtPath = config.vt?.path || "vt";
|
|
223
|
-
report({
|
|
229
|
+
report({
|
|
230
|
+
vtPath,
|
|
231
|
+
compareMethod: options.compareMethod,
|
|
232
|
+
colorThreshold: options.colorThreshold,
|
|
233
|
+
diffThreshold: options.diffThreshold,
|
|
234
|
+
});
|
|
224
235
|
});
|
|
225
236
|
|
|
226
237
|
vtCommand
|
|
@@ -239,6 +250,17 @@ vtCommand
|
|
|
239
250
|
|
|
240
251
|
const sitesCommand = program.command("sites").description("Rettangoli Sites");
|
|
241
252
|
|
|
253
|
+
sitesCommand
|
|
254
|
+
.command("init <project-name>")
|
|
255
|
+
.description("Initialize a new site from template")
|
|
256
|
+
.option("-t, --template <name>", "Template to use", "default")
|
|
257
|
+
.action((projectName, options) => {
|
|
258
|
+
initSite({
|
|
259
|
+
projectName,
|
|
260
|
+
template: options.template,
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
|
|
242
264
|
sitesCommand
|
|
243
265
|
.command("build")
|
|
244
266
|
.description("Build the site")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rtgl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
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.14",
|
|
51
|
-
"@rettangoli/sites": "0.2.
|
|
52
|
-
"@rettangoli/vt": "0.0.
|
|
53
|
-
"@rettangoli/ui": "0.1.
|
|
51
|
+
"@rettangoli/sites": "0.2.7",
|
|
52
|
+
"@rettangoli/vt": "0.0.14",
|
|
53
|
+
"@rettangoli/ui": "0.1.31"
|
|
54
54
|
}
|
|
55
55
|
}
|