Bower does not download git submodule (DojoX candidate plugin)

不羁的心 提交于 2019-12-02 11:21:00

Dojo does not really support to be installed through Bower. When you use the following command:

bower install dojo dijit dojox

All source files, tests, docs, ... are downloaded and not only the production-ready minified files. This is not really a "huge" problem, but it will leave a bigger footprint behind.


Back to your problem, I don't think it's possible at the moment to make Bower install Dojo as you indeed need to include the submodules, which you could install through:

git clone --recursive git@github.com:dojo/dojox

You can report this to the Bower team to make them support the --recursive part or you report this to the Dojo team, to make them support Bower (and only having minified/production files).


Right now, the best thing you could do is not to use Git for your Bower repository. With Bower you could actually load an external archive file as well, containing all files you need.

So in your case it would be:

bower install dojo=http://download.dojotoolkit.org/release-1.9.3/dojo-release-1.9.3.tar.gz

This will provide you the following directory structure:

  • bower_components
    • dojo
      • dijit
      • dojo
      • dojox

Another alternative is to make your own Dojo build and hosting it on a private Git repository. This might be a good solution for enterprises because it allows you to come with a unified Dojo build for all applications at the enterprise.

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