mackenzii/projects/frontend/post-build.js

10 lines
320 B
JavaScript

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