Created
January 27, 2014 17:30
Revisions
-
phillipalexander created this gist
Jan 27, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ var util = require('util'); var path = require('path'); var fs = require('fs'); var allFiles = fs.readdirSync(process.cwd()) var jsFiles = []; for (var i = 0; i < allFiles.length ; i++) { var selectedFile = allFiles[i]; if (selectedFile.substr(selectedFile.length - 3) === '.js') { jsFiles.push(selectedFile); } } console.log(jsFiles)