我试图让 Bower 在我的 Drupal 项目中工作。在我的项目的根目录中,我有一个bower.json
和.bowerrc
文件。Bower 组件正在安装在sites/all/themes/mytheme/libraries
.
html.tpl.php
我已经设置了 grunt-wiredep 以自动在我的文件中注入我的凉亭组件,如下所示:
wiredep: {
task: {
src: 'sites/all/themes/mytheme/templates/html.tpl.php'
}
}
使用grunt wiredep
时,插件将以下路径注入我的index.tpl.php
文件:
<script src="../libraries/jquery/dist/jquery.js"></script>
它应该在哪里:
<script src="sites/all/themes/mytheme/libraries/jquery/dist/jquery.js"></script>
我尝试添加directory: 'sites/all/thems/mytheme';
到wiredep 任务,但随后我收到未安装我的依赖项的错误。
任何人都可以帮助我吗?