MCPcopy
hub / github.com/sequelize/sequelize / rmDistDir

Function rmDistDir

build.js:20–36  ·  build.js::rmDistDir
()

Source from the content-addressed store, hash-verified

18const nodeMajorVersion = Number(process.version.match(/(?<=^v)\d+/));
19
20async function rmDistDir() {
21 try {
22 await stat(outdir);
23 if (nodeMajorVersion >= 14) {
24 const rm = promisify(fs.rm);
25 await rm(outdir, { recursive: true });
26 } else {
27 const rmdir = promisify(fs.rmdir);
28 if (nodeMajorVersion >= 12) {
29 await rmdir(outdir, { recursive: true });
30 } else {
31 await rmdir(outdir);
32 }}
33 } catch {
34 /* no-op */
35 }
36}
37
38async function main() {
39 console.log(class="st">'Compiling sequelize...');

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected