0

I am using grunt-contrib-concat and I need a way to automate my vendor concatenation step.

Right now, I specify manually in my GruntFile what vendor libraries should be concatenated.

Is there a way to get their names from my index.html? Using just the contrib-concat plugin and not usemin?

Any ideas?

concat: {
            app: {
                files: {
                    'dist/js/app.js': [
                        'src/**/*.js', 
                        '!src/**/*.spec.js', // Exlcude the spec files.
                        'tmp/*.js'
                    ]
                }
            },
            vendor: {
                src: [
                    'vendor/angular/angular.js', 
                    'vendor/angular-route/angular-route.js',
                    'vendor/angular-bootstrap/ui-bootstrap-tpls.js'
                ],
                dest: 'dist/js/vendor.js'
            }
        },
Dany D
  • 1,189
  • 2
  • 18
  • 44
  • Why not usemin? It does exactly what you want. – steveax Oct 12 '14 at 22:36
  • Usemin is too complex for this and also, it has other limitations... I am trying to wrap my head around this and come up with a simple solution – Dany D Oct 13 '14 at 07:05

0 Answers0