Skip to content

Instantly share code, notes, and snippets.

@antondevv
Created April 10, 2022 14:30
Show Gist options
  • Save antondevv/1fad758a71f9a516f2a6cd065a88d78f to your computer and use it in GitHub Desktop.
Save antondevv/1fad758a71f9a516f2a6cd065a88d78f to your computer and use it in GitHub Desktop.
build
function fromDir(pathName) {
const files = fs.readdirSync(pathName);
files.forEach((file) => {
const filename = path.join(pathName, file);
const stat = fs.lstatSync(filename);
if (stat.isDirectory()) {
fromDir(filename);
} else {
compileFile(
filename,
`${file.slice(0, -4) + "css"}`,
`src/lib/${file.slice(0, -4) + "css"}`
);
}
});
}
fromDir("src");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment