doc updates and test fixin
This commit is contained in:
26
scripts/create-test-icon.js
Normal file
26
scripts/create-test-icon.js
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Creates a 64x64 icon from test-flyer-image.png
|
||||
* Run from container: node scripts/create-test-icon.js
|
||||
*/
|
||||
|
||||
import sharp from 'sharp';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
const inputPath = path.join(__dirname, '../src/tests/assets/test-flyer-image.png');
|
||||
const outputPath = path.join(__dirname, '../src/tests/assets/test-flyer-icon.png');
|
||||
|
||||
sharp(inputPath)
|
||||
.resize(64, 64, { fit: 'cover' })
|
||||
.toFile(outputPath)
|
||||
.then(() => {
|
||||
console.log(`✓ Created icon: ${outputPath}`);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('Error creating icon:', err);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user