Open dziegler opened 10 years ago
Also added an option to specify the module name, since this was causing problems for me.
I originally had the module name option (like grunt-html2js it was called 'module') in the code but removed it because it didn't make sense for Brunch. Can you explain what issues you ran into without it? The problem with your implementation is that your module name will be the same for all three of your concatenated files, which doesn't work.
I'll look at your other patch tomorrow.
I'm concatenating my app and template javascript into one file, e.g.
templates: {
joinTo: {
'/dir/app.js': /^app/
}
}
templates: {
joinTo: {
'/dir/app.js': /^app/
}
}
If I merge it all into app.js then I have to call my template module 'app'. It works but is kind of weird.
For my use case, the reason I have multiple template js files is because they get served for different apps. They don't get loaded together so it's not a problem that they share the same module name, but I agree it might not be ideal.
It doesn't seem that the regex/callable in the joinTo clause works properly. E.g.
This seems to work as far as filtering out the correct tpl.html files to include, but the top angular.module that gets prepended to the file includes every module, not just the filtered modules.
I'm new to brunch so I don't know if there's a simpler patch, but this seems to work for me.