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

384 Views Asked by At

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 ?

1

There are 1 best solutions below

0
On BEST ANSWER

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 -->`