CLI Usage
npm install -g website-dependency-tree
the command
website-dependency-tree http://brillout.github.io/demo-website/simple_demo/
will print
ok http://brillout.github.io/demo-website/simple_demo/
├─┬ /hello.css
│ └── /duck.gif
├── /jquery.min.js
└── /hello.js
A more complete demonstration is available here
About
retrieves dependencies defined in
- HTML
- CSS
- ES2015/JSPM
- AMD/Require.JS
The dependencies are retrieved statically, i.e. the code is parsed and not executed.
API Usage
var website_dependency_tree = ; website_dependency_tree;
Potential Use Cases
- HTTP2 server push dependencies
- Client-Side prefetching
- Build process for deployment