Skip to content

Instantly share code, notes, and snippets.

@cecilemuller
Created February 5, 2015 18:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cecilemuller/162c5344515d2268b8f6 to your computer and use it in GitHub Desktop.
Save cecilemuller/162c5344515d2268b8f6 to your computer and use it in GitHub Desktop.
Get the list of dependencies of a Browserify application
var mdeps = require('module-deps');
var JSONStream = require('JSONStream');
var md = mdeps({
// "transformKey" allows it to find the transforms (e.g. JSX or ES6 precompilation) from package.json
transformKey: ['browserify', 'transform']
});
md.pipe(JSONStream.stringify()).pipe(process.stdout);
md.end({file: './src/index.js'});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment