topojson / us-atlas

Pre-built TopoJSON from the U.S. Census Bureau.
https://observablehq.com/@d3/u-s-map
ISC License
859 stars 139 forks source link

Make canvas & d3 deps optional #10

Closed mourner closed 10 years ago

mourner commented 10 years ago

Canvas and D3 are only needed for png generation (while most people would use the repo for rolling out TopoJSON), and they're a trouble to install via npm if you only have command-line-tools instead of full Xcode on OS X. So I suggest moving them to optional dependencies.

If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the optionalDependencies hash. This is a map of package name to version or url, just like the dependencies hash. The difference is that failure is tolerated.

tmcw commented 10 years ago

:+1: node-canvas also has some issues with homebrew which make it a bother to install sometimes.

mbostock commented 10 years ago

Makes sense, especially now that it doesn’t make the PNG targets by default.

mourner commented 10 years ago

Thanks Mike!