I've bower installed some Git repo that I need for my application and I did it by doing the following:
bower install git://github.com/user/cooltool.git --save
grunt bower-install
and then I get the following error:
cooltool was not injected in your file.
Please go take a look in "app/bower_components/cooltool" for the file you need, then manually include it in your file.
are Bower components that are installed straight from a GitHub repo always required to be manually added to my index.html
file? if not, how do I make it include the script correctly?
The Grunt tasks are all part of the yo angular-fullstack
scaffolding tool.
The gruntfile's bower-install
task is the following:
// Automatically inject Bower components into the app
'bower-install': {
app: {
html: '<%= yeoman.app %>/views/index.html',
ignorePath: '<%= yeoman.app %>/',
exclude: ['bootstrap-sass']
}
},
Ultimately, I want the script tag for that cooltool bower component to be injected into my index.html
in the Bower build:js section:
<!-- build:js(app) scripts/vendor.js -->
<!-- bower:js -->
<script ...>
<!-- endbower -->
<!-- endbuild -->
After performing running bower install git://github.com/user/cooltool.git --save
, there was a Bower directory created for it, and inside of that directory is a (hidden) .bower.json
file, but not a main bower.json
file:
.bower.json
:
{
"name": "d3-cloud",
"homepage": "https://github.com/jasondavies/d3-cloud",
"version": "1.0.5",
"_release": "1.0.5",
"_resolution": {
"type": "version",
"tag": "v1.0.5",
"commit": "83eb4128335eacdc0736ab7a6cafbdc2b124f484"
},
"_source": "https://github.com/jasondavies/d3-cloud.git",
"_target": "~1.0.5",
"_originalSource": "https://github.com/jasondavies/d3-cloud.git"
}
bower-install
task in your Gruntfile? – Normandnormandy.bower.json
(note that it is not a mainbower.json
, there isn't one – Jiggerypokerybower.json
file as well as amain
property within it in order for the injection to take place. – Decommission