Skip to content

An auxillary script that gives extra info on the use of requirejs in a web page.

License

Notifications You must be signed in to change notification settings

maxlk/xrayquire

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xrayrequire

An introspection tool for RequireJS. It dives into the the internals of RequireJS to show you information on the modules you load and flags some potential problems.

This is still under development. See the issues area for the features that it may support in the future.

See the tests directory for examples of the items xrayrequire checks.

Usage

Place it as a script tag right after require.js:

<script src="require.js"></script>
<script src="xrayrequire.js"></script>

You can use this link to download the latest master version:

https://raw.github.com/requirejs/xrayquire/master/xrayquire.js

or use volo to fetch it for you:

volo add xrayquire

Error checks

Case insensitive ID collisions

Checks for module IDs that differ only by case, which indicates a probable typing error, or something that will lead to problems on case insensitive operating systems.

Information views

There are some information views about the modules that were loaded. These views are shown by popping a new window to a data: URL that has the display.

These displays are still very new, need lots of work.

Dependency tree

To see the dependency tree for all the modules loaded, enter the following in the browser developer tool's console:

xrayquire.showTree()

Show cycles

To show cycles (circular dependencies) in the modules loaded, enter the following in the browser developer tool's console:

xrayquire.showCycles()

About

An auxillary script that gives extra info on the use of requirejs in a web page.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%