INNER CODE UNIT · JavaScript

main

convertigo/convertigo · convertigo-studio-web/post-build.js:30

async function main() {
	if (!fs.existsSync(tmpDir)) {
		throw new Error(`Temporary build directory missing: ${tmpDir}`);
	}

	const entries = await fs.promises.readdir(tmpDir);

	for (const entry of entries) {
		if (PRESERVE.has(entry)) {
			console.log(`🟡 Skip preserved: ${entry}`);
			continue;
		}

		const src = path.join(tmpDir, entry);
		const dest = path.join(targetDir, entry);

		if (await fsExtra.pathExists(dest)) {
			await fsExtra.remove(dest);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…