I thought that when I moved .js files within a directory that grunt-usemin would update the .js files listed within the <!-- build:js({.tmp,app}) scripts/scripts.js -->
blocks, but that doesn't seem to be the case.
I'm using the default Yeoman setup and haven't made any changes to the Gruntfile.js
I've tried grunt clean, but it seems to be only looking at the /dist folder.
The grunt-usemin
configuration only specifies where to find HTML files that should be scanned for <!-- build:... -->
blocks. Usemin
does not track the javascript (or css) files you want concatenated and uglified.
The .tmp
folder is used for files that are in-flight to the distribution location.
If you are moving files around, you also need to edit the build:js
blocks accordingly or look at the second link, below:
can grunt automatically include all my js in index.html? - does not apply to usemin
but is background for the next link
How to include scripts automatically in a yeoman/grunt project? - a little extra work, but if you can define a pattern/glob for your scripts you can use this answer to generate the build.js
block content before usemin
kicks in and does its work.
What is “{.tmp,app} ” in Yeoman generator?
grunt-usemin docs - GitHub docs, not the greatest, but the more you use and configure the plugin the more it makes sense.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With