@storm-software/unbuild
Version:
A package containing `unbuild` utilities for building Storm Software libraries and applications
30 lines (20 loc) • 944 B
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true});
var _chunk4D3WT42Ncjs = require('./chunk-4D3WT42N.cjs');
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
// src/clean.ts
var _promises = require('fs/promises');
async function clean(name = "Unbuild", directory, config) {
_chunk4D3WT42Ncjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
const stopwatch = _chunk4D3WT42Ncjs.getStopwatch.call(void 0, `${name} output clean`);
await cleanDirectories(name, directory, config);
stopwatch();
}
_chunkBGYQAVKQcjs.__name.call(void 0, clean, "clean");
async function cleanDirectories(name = "Unbuild", directory, config) {
await _promises.rm.call(void 0, directory, {
recursive: true,
force: true
});
}
_chunkBGYQAVKQcjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
exports.clean = clean; exports.cleanDirectories = cleanDirectories;