Closed onishiweb closed 8 years ago
Just to chip in: for me the point about running grunt --env=production
is that it's a step which needs to be remembered, and the impacts of not doing it could be significant (In terms of page load time?).
...hence the need for an automated process.
I agree it would be best if this was not an additional manual step for people to remember. My instinct on reading the above is that we should have Grunt create both, and update the Whippet deploy module to exclude the development versions.
@onishiweb Happy for you to discuss with the team and decide which way to go.
I think #18 mostly resolves this. There's also #24.
Been discussing Grunt and other scripts/styles issues with @dgmstuart around how we manage and reference compiled scripts and stylesheets in the Whippet Theme. The main question was: when do we run
grunt --env=production
and commit the files and how do we work with these in terms of development?In Grunt we have the
production
environment but this relies on being run with the--env
flag, which not many people are aware of. On EiG we've been running grunt production when either solving merge conflicts or before doing a PR to make sure things are minified etc. but this isn't a standard practice.Some ideas for solutions include:
Environment or other factor
scripts.php
file to include different versions of scripts/styles for each different environment using theGP_ENVIRONMENT
constant (as discussed with @leedxw & @harry-m and implemented on Govsite)Any thoughts @harry-m @tomdxw?