I am using grunt-usemin plugin. I wonder how to do below.
I have two blocks of usemin config in index.html
.
<!-- build:js /scripts/scriptsmin.js -->
<script src="/scripts/jquery.min.js"></script>
...
...
<!-- endbuild -->
<!-- build:js /scripts/scripts.js -->
<script src="/scripts/app.js"></script>
....
...
<!-- endbuild -->
First block, scriptsmin.js
, is minified files.
Second, scripts.js
, contains all files which needs minification.
I like to.
- run minifier (uglifyjs) on second block
- concat first block with minified version of second (step 1)
Is it possible if these blocks are in the same file. I saw a section on flow. Couldn't follow whether I can name the block of configuration, and set seperate flow on each of it. It talks about flow based on file name (index.html). How should I write the grunt useminPrepare
section.