add grid support
diff --git a/images/index.js b/images/index.js
index 29a09b0..a797159 100644
--- a/images/index.js
+++ b/images/index.js
@@ -59,6 +59,24 @@
type: (value) => ([0, 1].includes(+value) ? +value : 0),
description: 'export as individual assets',
},
+ {
+ name: 'grid',
+ alias: 'g',
+ type: (value) => (value || ''),
+ description: 'Grid size expressed in pixels (for example 1000x1000)',
+ },
+ {
+ name: 'frames',
+ alias: 'm',
+ type: (val) => {
+ const value = Number(val);
+ if (Number.isNaN(value) || value <= 1) {
+ return 0;
+ }
+ return value;
+ },
+ description: 'Number of frames to render',
+ },
];
const defaultSettings = {
@@ -200,6 +218,8 @@
&sampleRate=${settings.sampleRate}\
&resolution=${settings.resolution}\
&individualAssets=${settings.individualAssets}\
+&grid=${settings.grid}\
+&frames=${settings.frames}\
&path=${encodeURIComponent(path)}`;
const page = await browser.newPage();
page.on('console', (msg) => console.log('PAGE LOG:', msg.text())); // eslint-disable-line no-console
diff --git a/images/js/helpers/gold.js b/images/js/helpers/gold.js
index 696255d..4f3ad84 100644
--- a/images/js/helpers/gold.js
+++ b/images/js/helpers/gold.js
@@ -38,7 +38,9 @@
// Adds an image to the current imgtest process.
// the --test-name argument should be different for each animation
await execToPromise(`goldctl imgtest add --work-dir ./tmp --test-name "${testName}" --png-file "${imagePath}"`);
+ console.log('IMAGE UPLOADED');
} catch (error) {
+ console.log('IMAGE UPLOAD ERROR', error);
//
}
};
diff --git a/images/package.json b/images/package.json
index f6ed8b3..8eeef21 100644
--- a/images/package.json
+++ b/images/package.json
@@ -20,7 +20,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "./node_modules/.bin/eslint index.js",
- "validate": "node index.js"
+ "validate": "node index.js -g 1000x1000 -m 25"
},
"keywords": [],
"author": "",