MCPcopy Index your code
hub / github.com/huggingface/transformers.js / prepareOutDir

Function prepareOutDir

scripts/prepareOutDir.mjs:3–9  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

1import { existsSync, mkdirSync, rmSync } from "node:fs";
2
3export default function prepareOutDir(dir) {
4 if (existsSync(dir)) {
5 rmSync(dir, { recursive: true, force: true });
6 }
7
8 mkdirSync(dir, { recursive: true });
9}

Callers 2

dev.mjsFile · 0.85
build.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected