【发布时间】:2015-11-05 14:14:46
【问题描述】:
我正试图让 Bower 在我的 Drupal 项目中工作。在我的项目的根目录中,我有一个 bower.json 和 .bowerrc 文件。
Bower 组件正在sites/all/themes/mytheme/libraries 中安装。
我已经设置了 grunt-wiredep 来自动在我的 html.tpl.phpfile 中注入我的 bower 组件,如下所示:
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 任务中,但我收到未安装我的依赖项的错误。
谁能帮帮我?
【问题讨论】:
标签: drupal gruntjs bower grunt-wiredep