Skip to content

Instantly share code, notes, and snippets.

@cristijora
Created August 12, 2017 21:54
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 cristijora/83cf2039baa4796234959d3e430b169e to your computer and use it in GitHub Desktop.
Save cristijora/83cf2039baa4796234959d3e430b169e to your computer and use it in GitHub Desktop.
var appBasePath = './Scripts/app/'
var jsEntries = {}
// We search for index.js files inside basePath folder and make those as entries
fs.readdirSync(appBasePath).forEach(function (name) {
var indexFile = appBasePath + name + '/index.js'
if (fs.existsSync(indexFile)) {
jsEntries[name] = indexFile
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment