I thought it prudent to create an issue for this to work against in order to have some discussion and a paper trail on what is being done and why.
Impetus
EW's standard workflow was designed for Pantheon and Acquia hosting, which typically involves building a full artifact repo separate from the dev repo to deploy with git. As such, it included a Github workflow action (soon to be removed by @leeomara) that wasn't functioning for multiple reasons.
YG deploys their sites to their own servers using Git and maintaining separate dev and deploy/artifact repositories adds some unnecessary/undesirable process. It also isn't always ideal when switching to a different vendor to be responsible for deployment.
Recommended Changes
- Compile only DEV version of assets, allow Drupal's aggregation function to minify and consolidate them in production
- Switch to single package manager for consistency
Can use either yarn or npm, with potential for different devs to get different versions of packages used for development and build
- Use a single build mode/command
More than one build command can produce different results currently.
- Add and commit the
dist dir in the theme, excluding source maps (keep those git-ignored)
Source maps aren't needed by Drupal, are large, only needed during development and just produce diff noise.
- Remove/ignore any other unused assets or components that are never consumed by the theme or needed for the site to function
This should clean things up and make it easier in general to maintain and avoid confusion. At the same time, it does not change where/how the assets are compiled for distribution.
I thought it prudent to create an issue for this to work against in order to have some discussion and a paper trail on what is being done and why.
Impetus
EW's standard workflow was designed for Pantheon and Acquia hosting, which typically involves building a full artifact repo separate from the dev repo to deploy with git. As such, it included a Github workflow action (soon to be removed by @leeomara) that wasn't functioning for multiple reasons.
YG deploys their sites to their own servers using Git and maintaining separate dev and deploy/artifact repositories adds some unnecessary/undesirable process. It also isn't always ideal when switching to a different vendor to be responsible for deployment.
Recommended Changes
Can use either yarn or npm, with potential for different devs to get different versions of packages used for development and build
More than one build command can produce different results currently.
distdir in the theme, excluding source maps (keep those git-ignored)Source maps aren't needed by Drupal, are large, only needed during development and just produce diff noise.
This should clean things up and make it easier in general to maintain and avoid confusion. At the same time, it does not change where/how the assets are compiled for distribution.