Open patrickmcelwee opened 8 years ago
I propose adding two more steps to the QuickStart documentation for those using wiredep
(which includes those using a slush-generated app, of course). In the wiredep
task in gulpfile.js
, they should add two lines in order to add two exclusions to the options
:
var options = config.getWiredepDefaultOptions();
options.exclude.push('bower_components/jquery/dist/jquery.js');
options.exclude.push('bower_components/ml-lodlive/dist/ml-lodlive.complete.js');
Then, in index.html
, they add those dependencies explicitly before the <!-- build:js js/lib.js -->
tag:
<script src="/bower_components/jquery/dist/jquery.js"></script>
<script src="/bower_components/ml-lodlive/dist/ml-lodlive.complete.js"></script>
The root cause is in the slush template, but I agree the docs could make notes about making sure to put jquery above angular. Just putting jquery above angular in bower.json and rerunning gulp wiredep is enough, got that confirmed today again by someone. I'd rather not go as far to pushing jquery and such outside build and excluding them from wiredep..
James Kerr ran into this, and I confirmed: with a vanilla slush app, relying on
wiredep
to inject scripts intoindex.html
, working through the QuickStart steps results in an error:There is a workaround, by moving
ml-lodlive.complete.js
beforeangular.js
inindex.html
. But, sinceml-lodlive.complete.js
relies on jQuery,jquery.js
has to go to the top of the list. (Looking through some forums, it might actually be preferable to load jQuery first ... but that is an issue for slush itself)