Javascript 爆米花没有注射到你的档案里
在与grunt(grunt发球)合作时,我得到:Javascript 爆米花没有注射到你的档案里,javascript,angularjs,yeoman,bower,popcornjs,Javascript,Angularjs,Yeoman,Bower,Popcornjs,在与grunt(grunt发球)合作时,我得到: 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
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"
}
}
至于my 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>
“.”
我是不是错过了什么?其他库工作正常。我只是在
popcornjs
上快速搜索了一下。当你说“bower安装--save popcornjs”时,你得到的回购协议是。该repo有一个bower.json
文件,该文件中有一个main
属性。该属性告诉grunt bower安装要在HTML中插入的文件
但是,您使用的是版本~1.3.0
,这将下拉此:。它没有bower.json
,因此grunt-bower安装
无法知道要包含什么文件
解决方案是手动将其包含在HTML中,或升级到正确使用Bower的较新版本。是主爆米花文件吗?代码中不包含.@RUJordan popcorn.corn.js不在包中。@RUJordan我在直接从github下载的压缩球中也找不到popcorn.corn.js。