Created
April 10, 2022 14:30
-
-
Save antondevv/1fad758a71f9a516f2a6cd065a88d78f to your computer and use it in GitHub Desktop.
build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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