1#!/usr/bin/env node
2import fs from 'fs';
3import path from 'path';
4import { fileURLToPath } from 'url';
5
6const __filename = fileURLToPath(import.meta.url);
7const __dirname = path.dirname(__filename);
8
9// Get the absolute path to the src directory
10const srcDir = path.resolve(__dirname, '..', 'src');
11
12const buildInfo = {
13 timestamp: Date.now(),
14 date: new Date().toISOString(),
15 srcDir: srcDir
16};
17
18fs.writeFileSync(
19 path.join(__dirname, '..', 'dist', 'build-info.json'),
20 JSON.stringify(buildInfo, null, 2)
21);
22
23console.log('Build info written:', buildInfo.date);