Ok, didn’t have my coffee before I read your post.
So head over to your
Gruntfile.js @ line 132 and add the build tasks:
Then jump down to line 139 and add
uglify to the
This is my final
watch which I verified works:
tasks: ['less:dev', 'autoprefixer:dev', 'less:build', 'autoprefixer:build']
'<%= jshint.all %>'
tasks: ['jshint', 'concat', 'uglify']
Btw, you can see how
WP_ENV works, it’s very simple–either it’s set to
development or it defaults. Just check here: https://github.com/roots/roots/blob/master/lib/scripts.php#L22.
I also realized that Grunt’s default behavior is not to generate both minified and unminified assets as I previously stated, so it depends on the parameter you pass to
grunt. By default, it’s set to generate only unminified assets: