Fix: frontend assets should be added to vendor #220
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
We want the frontend assets and directories added to a Solidus app because
Solidus extensions assume that these files and directories exist. The Solidus
extensions typically link these pre-existing files to their assets.
Expected behavior
Given I have a Solidus app without a frontend
When I apply the SolidusStarterFrontend template to the app
Then I should see the following frontend assets and directories added to the
app:
vendor/assets/images/spree/frontend
vendor/assets/javascripts/spree/frontend/all.js
vendor/assets/stylesheets/spree/frontend/all.css
Current behavior
SolidusStarterFrontend doesn't add the frontend assets and directories to the
app's vendor directory.
Bug cause
Prior to solidusio/solidus#4251, the Solidus Install
generator was adding the frontend assets during installation even if the app
didn't have
solidus_frontend
in its bundle. With the issue fixed,SolidusStarterFrontend has to be updated to add these frontend assets by
itself.
Video explanation
https://www.dropbox.com/s/b673ijy66cafx0n/eng-296-update-solidusstarterfrontend-to-add-all.mkv?dl=0
Video: demo of bug and fix
2022-02-22.18-29-18.mp4
Types of changes
Checklist: