How can I configure usemin for several purposes?

I need to configure my Gruntfile to handle multiple front-end directories. I currently have the setup as follows:

main
--assets
----js
vnext
--assets
----js
Gruntfile.js

My current usemin / useminPrepare configuration:

useminPrepare: {
  main:{
    src: ['main/index.html'],
    options:{
     dest: 'dist/main',
     staging: '.tmp/main'}},
  vnext:{
    src: ['vnext/index.html'],
    options:{
     dest: 'dist/vnext'
     staging: '.tmp/vnext'}}
},
usemin:{
  html: ['dist/**/index.html']
}

However, the problem is that when I run the useminPrepare task, the second target (vnext) adds its files to the source of the first target. Is there a way for useminPrepare to keep things separate?

+4
source share

All Articles