0.0.3 • Published 8 years ago

webpack-dependency-stats v0.0.3

Weekly downloads
52
License
MIT
Repository
github
Last release
8 years ago

Webpack Dependency Stats

npm version Dependency Status Build status Build status js-semistandard-style Coverage Status

A helper to get a flat list of all dependencies and dependents of a given module

Installation

Install the plugin with npm:

$ npm install --save-dev webpack-dependency-stats

Basic Usage

You have to pass the stats from the webpack compilation: https://webpack.github.io/docs/node.js-api.html#stats

var webpackDependencyStats = new WebpackDependencyStats(stats, {
  srcFolder: path.resolve(__dirname, 'src')
});
console.log(webpackDependencyStats.getDependencies('./entry.js'));
console.log(webpackDependencyStats.getDependents('./entry.js'));

Include external dependencies

var webpackDependencyStats = new WebpackDependencyStats(stats, {
  srcFolder: path.resolve(__dirname, 'src'),
  onlyLocal: false
});
console.log(webpackDependencyStats.getDependencies('./entry.js'));
console.log(webpackDependencyStats.getDependents('./entry.js'));

Changelog

Take a look at the CHANGELOG.md.

Contribution

You're free to contribute to this project by submitting issues and/or pull requests. This project is test-driven, so keep in mind that every change and new feature should be covered by tests. This project uses the semistandard code style.

License

This project is licensed under MIT.

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago