-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.js
More file actions
25 lines (20 loc) · 606 Bytes
/
build.js
File metadata and controls
25 lines (20 loc) · 606 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env node
import dotenv from 'dotenv';
import { spawn } from 'child_process';
// Load environment variables from .env file
dotenv.config();
console.log('🏗️ Building microfolio...');
// Run vite build
const vite = spawn('npx', ['vite', 'build'], {
stdio: 'inherit',
env: process.env
});
vite.on('close', (code) => {
if (code === 0) {
console.log('✅ Build completed successfully!');
console.log('💡 Tip: Run `pnpm run optimize-images` before build to generate optimized thumbnails');
} else {
console.error('❌ Build failed with code:', code);
}
process.exit(code);
});