Skip to content

Instantly share code, notes, and snippets.

// Usage:
//
// 1. Load this script directly after RequireJS, e.g.
// <script src="src/js/require.js" data-main="src/js/index"></script>
// <script src="src/js/require-tree.js"></script>
// 2. View the dependency tree from the app root ("index" in this example):
// JSON.stringify(requireTree.index, null, 4);
// 3. View the load order of modules:
// JSON.stringify(requireTree.toLoadOrder(), null, 4);

Keybase proof

I hereby claim:

  • I am twpol on github.
  • I am twpol (https://keybase.io/twpol) on keybase.
  • I have a public key whose fingerprint is 10E4 5853 AC68 AF17 4C51 016E D432 D3C0 50E0 1B32

To claim this, I am signing this object: