Initialise le dépôt Bonpoint avec docs et prototype web.
Structure docs/, web/ (app Node existante) et mobile/ (placeholder Flutter).
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
const path = require('path');
|
||||
const sharp = require('sharp');
|
||||
|
||||
const svgPath = path.join(__dirname, '..', 'public', 'icons', 'icon.svg');
|
||||
const outDir = path.join(__dirname, '..', 'public', 'icons');
|
||||
|
||||
const sizes = [180, 192, 512];
|
||||
|
||||
Promise.all(sizes.map((size) => sharp(svgPath)
|
||||
.resize(size, size)
|
||||
.png()
|
||||
.toFile(path.join(outDir, size === 180 ? 'apple-touch-icon.png' : `icon-${size}.png`))))
|
||||
.then(() => console.log('Icônes générées'))
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user