brangerbriz / liBB.js

A JavaScript library/framework for creating interactive && generative apps + installations in/out of the browser
http://libb.brangerbriz.com/
GNU General Public License v3.0
1 stars 2 forks source link

Protect against Requirejs circular dependencies #5

Closed brannondorsey closed 9 years ago

brannondorsey commented 9 years ago

We seem to be safe for now as there are no circular dependencies right now. That said, we will likely encounter this again as we develop the library so there is a good tool call Madge (which we currently include as a devDependency in package.json) which traverses RequireJS source code and shows circular dependencies.

Usage is:

path/to/madge -f amd --circular path/to/src

i.e.

madge -f amd --circular ./src

RequireJS documentation describes how to account for circular dependencies in its documentation: http://requirejs.org/docs/api.html#circular