mackenzii/projects/frontend/post-build.js
2024-11-04 19:25:14 -05:00

10 lines
314 B
JavaScript

import { existsSync } from 'fs';
import { readFile } from 'fs/promises';
import { setCurrent } from '../sites/src/set-current.js'
(async () => {
if (existsSync('../sites/sites/current.txt')) {
const site = await readFile('../sites/sites/current.txt', { encoding: 'utf-8' });
setCurrent(site);
}
})();