9
0
mirror of https://github.com/donlon/cloudflare-error-page.git synced 2025-12-23 00:39:29 +00:00
Files
cloudflare-error-page/javascript/scripts/copy-files.js
2025-12-22 23:46:21 +08:00

15 lines
460 B
JavaScript

import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
// Resolve the directory of this script
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Define paths relative to scripts/copy.js
const src = path.resolve(__dirname, "../../resources/styles/main.css");
const dest = path.resolve(__dirname, "../src/templates/main.css");
// Copy file
fs.copyFileSync(src, dest);