Search code examples
javascriptyeomanyeoman-generator-angular

Yeoman Gruntfile.js - add a vendors directory to the dist build


I have this current dist organization :

enter image description here

I want this one :

enter image description here

As you can see I want my dist vendors files vendor.sha.js and oldieshim.sha.js in a directory vendors. How should I do this in the Angular Yeoman Gruntfile ?


Solution

  • Had a night to think of it. Just had to learn how HTML blocks works with the Grunt-usemin. So needed to customize that in my HTML :

    <!-- build:js(.) scripts/oldieshim.js --> TO : `<!-- build:js(.) scripts/vendors/oldieshim.js -->`
    <!-- build:js(.) scripts/vendor.js --> TO : `<!-- build:js(.) scripts/vendors/vendor.js -->`