You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a simple way to parse an entire directory without having to define and then read each one individually?
For instance, I have a folder of .scss partials using CSS Custom Properties and I want to give the user an option to add a prefix to all pre-defined properties (ie --{{prefix}}-background-color: blue;) before I clone the template directory into their desired output.
I can make it work if I add a template title for each in the md file and then read() the file but that's a bit tedious. Any way to loop through the directory and read each file? I've started to write a helper function recursively using readdir however I can't see a way around having to re-write all of the writefile/mkdir/check exists functionality that you've already elegantly handled.
Any thoughts or guidance? Or maybe this is an enhancement recommendation. Really loving the script!
Your Environment
OS: macOS Sonoma
scaffdog version: 4.0
The text was updated successfully, but these errors were encountered:
scaffdog currently does not have the capability to analyze entire directories 😭
I apologize for my limited understanding, but could you provide a simple example of the specific file structure you are dealing with and what output you are expecting 👀 ?
A simple example would help me understand and possibly lead to a solution or the development of a refined feature.
Is there a simple way to parse an entire directory without having to define and then read each one individually?
For instance, I have a folder of
.scss
partials using CSS Custom Properties and I want to give the user an option to add a prefix to all pre-defined properties (ie--{{prefix}}-background-color: blue;
) before I clone the template directory into their desired output.I can make it work if I add a template title for each in the md file and then
read()
the file but that's a bit tedious. Any way to loop through the directory and read each file? I've started to write a helper function recursively usingreaddir
however I can't see a way around having to re-write all of the writefile/mkdir/check exists functionality that you've already elegantly handled.Any thoughts or guidance? Or maybe this is an enhancement recommendation. Really loving the script!
Your Environment
The text was updated successfully, but these errors were encountered: