我们正试图在目前使用angularjs的项目中引入clojurescript。我们正在使用一个外部的javascript库——datamaps。我们使用“:foreign-libs”编译选项以以下方式获取依赖文件:
我们遇到了一个错误,提示为:"Cannot read property 'world' of undefined"。
我们将这个问题缩小到datamaps文件中的问题,我们认为这是因为在foreign-libs选项中,我们只提到了特定的datamaps.js文件,而没有包含datamaps文件夹中的其他文件,因此无法正确编译整个库。
有没有办法将整个库作为依赖项包含进来,而不仅仅是单个文件?
:compiler {:output-to "resources/public/js/testable.js"
:main "gofigure.test-runner"
:foreign-libs [{:file "globe.js"
:provides ["globe"]}
{:file "datamaps/src/js/datamaps.js"
:provides ["datamaps"]}
{:file "d3/d3.js"
:provides ["d3"]}
{:file "topojson/topojson.js"
:provides ["topojson"]}}}
我们遇到了一个错误,提示为:"Cannot read property 'world' of undefined"。
我们将这个问题缩小到datamaps文件中的问题,我们认为这是因为在foreign-libs选项中,我们只提到了特定的datamaps.js文件,而没有包含datamaps文件夹中的其他文件,因此无法正确编译整个库。
有没有办法将整个库作为依赖项包含进来,而不仅仅是单个文件?