datahub/site/scripts/fix-symlinks.mjs
João Demenech ad209c8f21
merge: First tutorial + Example (#804)
## Changes:

- /docs is now a Getting Started page with the first tutorial
- basic-example added
2023-04-27 14:55:54 -03:00

16 lines
348 B
JavaScript

// Script executed before builds
import { exec } from "child_process";
import fs from "fs";
// If Vercel environment is detected
if (process.env.VERCEL_ENV) {
console.log(
"[scripts/fix-symlinks.mjs] Vercel environment detected. Fixing symlinks..."
);
// fs.unlinkSync('public/assets')
exec('cp -r ./content/assets ./public/')
}