Closed nareshbhatia closed 2 years ago
I am using version 6.0.0 and it seems that noDir is not working.
noDir
const path = require('path'); const klawSync = require('klaw-sync'); const tmplDir = path.join(__dirname, 'generators/react/app/templates/'); // get all templates (no directories) const templates = klawSync(tmplDir, { noDir: true }); templates.forEach((template) => { const tmplPath = template.path; console.log(template.stats.isFile() ? 'f' : 'd', tmplPath); });
Output shows both files and directories. Am I doing something wrong?
Sorry, my bad. I had the option spelled as noDir. It should have been nodir.
nodir
I am using version 6.0.0 and it seems that
noDir
is not working.Output shows both files and directories. Am I doing something wrong?