0

I have bunch of settings.js files where i have const item in a folder called components folder, i want to create a nodejs function so that it finds all the settings.js files and get all items and console logs them is it possible? if yes then how

Dev2840
  • 1
  • 1
  • 1
    use fs.. can you show your attempt, directory structure and contents of a settings.js file and expected output. Your question is not that clear, you can only have a single settings.js file in a folder – Lawrence Cherone May 25 '21 at 00:09
  • my Folder structure is: ```bash ├── components │   ├── Atoms │   │   ├── Paragraph │   │   │   ├── Paragraph.jsx │   │   │   ├── Paragraph.module.scss │   │   │   ├── settings.js │   │   ├── Title │   │   │   ├── Title.jsx │   │   │   ├── Title.module.scss │   │   │   ├── settings.js │   ├── Molecules │   │   ├── GenericAligned │   │   │   ├── GenericAligned.jsx │   │   │   ├── GenericAligned.module.scss │   │   │   ├── settings.js ``` I havent started attempt yet – Dev2840 May 25 '21 at 01:07
  • you should add it to your question. Also you need to do some research and make an attempt, here is a starting point [nodejs load file](https://stackoverflow.com/questions/9890473/nodejs-load-file) – Lawrence Cherone May 25 '21 at 12:22

0 Answers0