Skip to content

Instantly share code, notes, and snippets.

@bramblex
Created October 28, 2016 06:21
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 bramblex/cb85fadb1a97298426b1d7ac89b28eab to your computer and use it in GitHub Desktop.
Save bramblex/cb85fadb1a97298426b1d7ac89b28eab to your computer and use it in GitHub Desktop.
const deps = {}
const resolve = p => {
if (!deps[p]){
deps[p] = true
const p_deps = require(`${p}/package.json`).dependencies || []
Object.keys(p_deps).forEach(function(p){
return resolve(p)
})
}
}
resolve('.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment