Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset build file - remove unused vars and add defaults if build file can't be found #675

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

bradp
Copy link
Contributor

@bradp bradp commented Jun 15, 2021

This needs some testing, I don't have the asset files locally and they don't seem to build, so this is my workaround for it.
It also removes the $version / $debug vars, as they aren't used.

@bradp bradp requested a review from coreymcollins as a code owner June 15, 2021 15:33
Copy link
Contributor

@coreymcollins coreymcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all seems to work for me!

Steps to test:

  1. Check out the branch
  2. Run npm ci
  3. Verify everything built properly
  4. Test on the frontend to ensure stylesheets and scripts are loading as expected (they are!)
  5. Manually delete index.asset.php file
  6. Test on the frontend to ensure stylesheets and scripts are loading as expected (they still are!)
  7. Run npm run build to regenerate the index.asset.php file
  8. Test on the frontend to ensure stylesheets and scripts are loading as expected (they still still are!)

@bradp – I saw that you edited your initial comment with a strikethrough. Did anything change on your end that needs to be further tested?

@bradp
Copy link
Contributor Author

bradp commented Jun 15, 2021

Nope - the strikethrough was that I got my local fixed and able to build!

Also with this PR, we remove the issue of the theme fatal erroring if it isn't built, which is always a good thing to avoid those.

@coreymcollins coreymcollins merged commit abb4de7 into main Jun 15, 2021
@coreymcollins coreymcollins deleted the fix/update-asset-file branch June 15, 2021 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants