ericclemmons / grunt-angular-templates

Grunt build task to concatenate & pre-load your AngularJS templates
MIT License
710 stars 107 forks source link

Angular module per each files source #113

Open gugiserman opened 9 years ago

gugiserman commented 9 years ago

E.g.: (two components in their own ng-module and a default module for the rest)

ngtemplates:
  files: [
    { cwd: 'src/components/',
      src: 'component/*.html', dest: 'build/components/component/component-template.js',
      module: 'component' },
    { cwd: 'src/components/',
      src: 'other-component/*.html', dest: 'build/components/other-component/other-component-template.js',
      module: 'other.component' },
    { cwd: 'src/templates/',
      src: '*.html', dest: 'build/templates/app-templates.js' },
  ]
  options: {
    module: 'app'
  }
ericclemmons commented 9 years ago

I'm amazed that tests still pass with this change! It must be due to Grunt's internal normalizing of files or whatever.

gugiserman commented 9 years ago

Magic meme gif

underscorebrody commented 9 years ago

@gugiserman I'm not sure I agree that this doesn't justify a new test, given that it adds completely new functionality. Would you mind adding one?