Closed firedev closed 9 years ago
@firedev The correct file you need to reference is sir-trevor.js
rather than index.js
located in the same directory.
That is closed too soon I guess. Packages installed via rails-assets are supposed to obey the rules. I.e. the require line matches the name of asset installed.
Our bower.json
is missing definition of main
files, therefore you have to include them by hand.
Don't know what rules you're talking about?
Well guess I was expected main to expose assets.
The main definition is now present (as of 0.5.0-beta2) in bower.json - correctly referencing the sir-trevor.js
file. Until this is available through rails-assets.org you can refence the correct file manually. Note the dependency on jQuery:
//= require jquery
//= require underscore
//= require Eventable
//= require sir-trevor-js/sir-trevor
This all loads up ok.
Yep that's what I did, thanks.
Be aware that using 0.5.0-beta isn't recommended for production yet, we're in the middle of huge rewrite.
Here are my files:
Html output:
Yet
index.js
consists of only one line:And the pages gives me an error:
So I tried to add
rails-assets-angular
to the mix. But that didn't help either.Please advise what am I doing wrong. Thank you.