최초 배포

This commit is contained in:
2026-01-27 16:55:03 +09:00
commit 6ebf8e8df7
76 changed files with 5990 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
const sharp = require('sharp');
const fs = require('fs');
const path = require('path');
// /app/data 디렉토리 사용
const DATA_DIR = path.join(__dirname, 'data');
const svgPath = path.join(DATA_DIR, 'icon.svg');
// icon.svg가 존재하는지 확인
if (!fs.existsSync(svgPath)) {
console.error(`File not found: ${svgPath}`);
process.exit(1);
}
const svgBuffer = fs.readFileSync(svgPath);
async function convert() {
try {
console.log('Converting icons from:', svgPath);
await sharp(svgBuffer).resize(64, 64).png().toFile(path.join(DATA_DIR, 'favicon.png'));
await sharp(svgBuffer).resize(192, 192).png().toFile(path.join(DATA_DIR, 'pwa-192x192.png'));
await sharp(svgBuffer).resize(512, 512).png().toFile(path.join(DATA_DIR, 'pwa-512x512.png'));
await sharp(svgBuffer).resize(180, 180).png().toFile(path.join(DATA_DIR, 'apple-touch-icon.png'));
console.log('Conversion complete. Files saved to:', DATA_DIR);
} catch (err) {
console.error('Error converting icons:', err);
process.exit(1);
}
}
convert();