Created
September 30, 2016 09:56
-
-
Save sh4869/d777047800144054fdec95274aaf0110 to your computer and use it in GitHub Desktop.
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
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