Initial commit

This commit is contained in:
Daeng Deni Mardaeni
2023-07-03 14:33:24 +07:00
commit 6210e33a3b
3798 changed files with 258149 additions and 0 deletions

View File

@ -0,0 +1,23 @@
import del from "del";
import { build } from "./build.js";
import { getDemo } from "./helpers.js";
// task to clean and delete dist directory content
const getPaths = () => {
const paths = ['!config'];
const outputs = build.config.dist;
outputs.forEach((output) => {
paths.push(output.replace("{demo}", getDemo()));
});
const realpaths = [];
paths.forEach((path) => {
realpaths.push(path + "/*");
});
return realpaths;
};
export const cleanTask = () => {
return del(getPaths(), { force: true });
};