Skip to content

Instantly share code, notes, and snippets.

@sh4869
Created September 30, 2016 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sh4869/d777047800144054fdec95274aaf0110 to your computer and use it in GitHub Desktop.
Save sh4869/d777047800144054fdec95274aaf0110 to your computer and use it in GitHub Desktop.
var fileArray = new Array();
var files = fs.readdirSync('src')
.filter((file) => { return fs.statSync('src/' + file).isDirectory()})
.filter((file) => {return file !== 'js' && file !== 'img' && file !== 'css'})
.map((dir) => fs.readdirSync('src/' + dir)
.map((file) => { return dir + '/' + file})
.forEach((files) => {
fileArray.push(files)
}
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment