Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

If we choose to use any angular-*.js file, all files generated afterwards are included on the wrong group. #278

Closed
wlepinski opened this issue Jul 12, 2013 · 1 comment · Fixed by #286
Assignees

Comments

@wlepinski
Copy link

Detailing this issue a little more. This is what I get on the index.html when I executed the following commands:

-> ~/angular-yeoman $ yo angular
[?] Would you like to include Twitter Bootstrap?: Yes
[?] Would you like to use Twitter Bootstrap for Compass (as opposed to vanilla CSS)?: Yes
[?] Would you like to include angular-resource.js?: Yes
[?] Would you like to include angular-cookies.js?: Yes
[?] Would you like to include angular-sanitize.js?: Yes

Create a new controller using generator:

yo angular:controller test

Resulting html:

<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/app.js"></script>
<script src="scripts/controllers/main.js"></script>
<!-- endbuild -->

<!-- build:js scripts/plugins.js -->
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-affix.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-alert.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-dropdown.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-tooltip.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-modal.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-transition.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-button.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-popover.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-typeahead.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-carousel.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-scrollspy.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-collapse.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-tab.js"></script>
<!-- endbuild -->

<!-- build:js scripts/modules.js -->
<script src="bower_components/angular-resource/angular-resource.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="scripts/controllers/test.js"></script>
<!-- endbuild -->

I guess the test.js should be placed inside the group that generates scripts/scripts.js.

@eddiemonge
Copy link
Member

that first block is in the wrong order. that should come after the plugins and modules and the test.js should go in there

@ghost ghost assigned passy Jul 20, 2013
passy added a commit to passy/generator-angular that referenced this issue Jul 20, 2013
Plugins should be loaded before the application JS.

Fixes yeoman#278
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants