Hmm, it's worth a second look at grunt again, in that case. I was originally spending Way Too Much Time getting grunt plugins to generate index.html (I ended up moving away from yeoman in general as it didn't support this new, more-modular approach at the time). Thanks for the tip - that's one of those gotchas that doesn't get me Every Time anymore, but it still gets me frequently.
The irony (hilarity) of my current build toolchain is that I use Grunt to handle stuff like task running and meta-building, and then use a grunt task to kick off broccoli which handles the rebuild and livereload. It's probably way over-engineered, espeically since I further tweaked broccoli to only focus on stuff in /web in my project, so I could keep /bower_components separate (it was doing a lot of polling of directories that would never change during runtime), but that means a separate server for bower_components. So now, grunt launches a basic node script that sets up http, attaches broccoli as a middleware, does a static middleware on bower, and sets up a proxy so that requests to /api get properly sent to my (other) node server that's running the backend. Yeah, I really should take a look at that. On the other hand, it works. Why mess with success? e On Fri, Jun 13, 2014 at 5:54 AM, Scott McDonnell <[email protected]> wrote: > I use the same structure as Eric and it is really working well. > > * - The annoying bit is that when I add a new component or page, I have to > add the relevant js in index.html * > > Just on this I use the yeoman grunt file and I have added > grunt-file-blocks <https://www.npmjs.org/package/grunt-file-blocks> to > take care of adding new js files to the index - something like this: > > // Adds script elements to the HTML file > fileblocks: { > html: { > src: 'app/index.html', > blocks: { > 'scripts': { > src: [ > 'scripts/app.js', //make sure the main app module appears > first > 'scripts/**/*.js' > ], > cwd: 'app' > } > } > } > }, > > > This really encourages me to split out each module, controller etc. into > lots of separate js files, which make life a lot easier. I just run 'grunt > serve' again and all new files are added to my index.html > > > > On Wednesday, June 11, 2014 10:03:58 PM UTC+1, Eric Eslinger wrote: >> >> >> The annoying bit is that when I add a new component or page, I have to >> add the relevant js in index.html and remember to add the dependency in >> app.js (and import the scss in main.scss) >> >> -- > You received this message because you are subscribed to the Google Groups > "AngularJS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
