I want to run d3 from a Cakefile

非 Y 不嫁゛ 提交于 2019-12-03 03:46:27

See D3's package.json. More specifically, the file you want to require when running inside Node or similar environments is index.js rather than d3.v2.js; this file contains some special patches that make D3 compatible with the require operator.

To try it out for yourself, cd to the d3 repository, run node to create an interactive shell, and then say

var d3 = require("./");

Or, if you're in your own project folder, if you've installed D3 into node_modules/d3 via npm (npm install d3), you can say:

var d3 = require("d3");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!