当我用咕哝(咕噜发球)表演的时候,我得到了:
Running "bower-install:app" (bower-install) task
popcornjs was not injected in your file.
Please go take a look in "app\bower_components\popcornjs" for the file you need, then manually include it in your file.我将Popcorn.js添加到bower.json中:
{
"name": "NAME",
"version": "0.0.0",
"dependencies": {
"angular": "1.2.6",
.
"popcornjs": "~1.3.0",
.
"angular-slugify": "1.0.0"
},
"devDependencies": {
"angular-mocks": "1.2.6",
"angular-scenario": "1.2.6"
}
}所以我的index.html:
<s_cript src="bower_components/popcornjs/popcorn.js"></script>
<s_cript src="bower_components/popcornjs/modules/player/popcorn.player.js"></script>
<s_cript src="bower_components/popcornjs/players/youtube/popcorn.youtube.js"></script>
<s_cript src="bower_components/popcornjs/plugins/code/popcorn.code.js"></script>.“.”
我错过了什么吗?其他图书馆运转良好。
发布于 2014-02-19 22:10:56
我刚在popcornjs上做了个快速搜索。当你说bower install --save popcornjs是https://github.com/mozilla/popcorn-js/的时候,你从回购中拉出来的。该repo有一个bower.json文件,该文件中有一个main属性。该属性告诉grunt-bower-install要在HTML中插入什么文件。
但是,您使用的是~1.3.0版本,它将删除以下内容:https://github.com/mozilla/popcorn-js/tree/v1.3.0。这没有一个bower.json,因此grunt-bower-install无法知道要包含哪个文件。
解决方案是手动将其包含在HTML中,或者升级到正确使用Bower的更新版本。
https://stackoverflow.com/questions/21840776
复制相似问题