Popcorn has not been entered into your file.

While staging with grunt (grunt serve) I get:

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.

I added Popcorn.js to 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"
    }
}

As for 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>

. ''

Am I missing something? Other libraries work fine.

+4
source share
1 answer

I just did a quick search on popcornjs. The repo you exit when you talk bower install --save popcornjsis https://github.com/mozilla/popcorn-js/ . This repo has a file bower.json, and this file has a property main. This property tells grunt-bower-installwhich file to enter in your HTML.

, ~1.3.0, : https://github.com/mozilla/popcorn-js/tree/v1.3.0. bower.json, grunt-bower-install , .

, HTML , Bower.

+7

Source: https://habr.com/ru/post/1527395/


All Articles