如何指定用于凉亭组件的默认文件,以便通过grunt-bower-install正确注入?为组件配置Grunt-Bower-Install路径
我正在与datejs合作,根据您的本地化他们有不同的文件。我想包括的文件不在bower_components根/ datejs目录,所以我得到的错误:
datejs was not injected in your file.
Please go take a look in "app/bower_components/datejs" for the file you need, then manually include it in your file.
我想我最难避免硬编码datejs到我的索引文件并没有真正想要将“date-en-US.js”文件移动到datejs目录的根目录中。
这是datejs凉亭组件的结构。
bower_components
└── datejs
└── build
└── ...
└── date-en-US.js
└── ...
└── src
└── test
和公正的情况下,这会有所帮助,这是位于datejs的.bower.json文件凉亭组件路径:
{
"name": "datejs",
"homepage": "https://github.com/datejs/Datejs",
"_release": "7bdddb55d6",
"_resolution": {
"type": "branch",
"branch": "master",
"commit": "7bdddb55d69719e42c358c3a2b7df706ff3090f8"
},
"_source": "git://github.com/datejs/Datejs.git",
"_target": "*",
"_originalSource": "datejs",
"_direct": true
}
确实!关于[wiredep](https://github.com/taptapship/wiredep#bower-overrides)的更多解释,请参阅[grunt-wiredep](https://github.com/stephenplusplus/grunt-wiredep#behind-幕后)。 Thx @nknj – pgu