An experimental fork of d3 implemented as a collection of AMD modules.
This repo's version of
d3.js (in dist/) should be functionally identical to mbostock's master version, but is built via r.js instead of SMASH. The
Makefile utilizes r.js'
onBuildWrite feature to remove the AMD definitions from the built file, thus achieving SMASH's goal of keeping injected modules in the same scope as their caller. The built file currently contains no AMD calls or dependencies.
There is also an experimental
amd/d3.js that preserves the AMD overhead and is meant for use with an AMD loader like RequireJS.
amd/d3.js currently doesn't work, as I still need sort out some internal dependency issues.
The immediate goal of this project is to make it possible for me to selectively integrate submodules from d3 (dsv, geo, etc) into an AMD project workflow, with a single build containing both d3 and project-specific code. The longer term goal is to explore the possibility of migrating the upstream project over to AMD. In the meantime, if you just want to use stock d3 in an AMD project, you could use a shim config or add a define() wrapper directly to d3.js.
Want to learn more? See the wiki.