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

Skip asset inclusion during installation when the assets don't exist #45

Open
blocknotes opened this issue Dec 30, 2019 · 2 comments
Open

Comments

@blocknotes
Copy link
Contributor

An extension without assets will fail specs because the test_app is always created requiring the assets (even if they don't exist).

Running extension installation generator...
      append  vendor/assets/javascripts/spree/frontend/all.js
      append  vendor/assets/javascripts/spree/backend/all.js
      insert  vendor/assets/stylesheets/spree/frontend/all.css
      insert  vendor/assets/stylesheets/spree/backend/all.css
@blocknotes blocknotes added the bug Describes or fixes a bug. label Dec 30, 2019
@aldesantis aldesantis added blocked Blocked by external factors. and removed blocked Blocked by external factors. labels Jan 10, 2020
@aldesantis aldesantis changed the title Remove (or handle better) assets requires in dummy app Skip asset inclusion when assets don't exist Jan 10, 2020
@aldesantis aldesantis changed the title Skip asset inclusion when assets don't exist Skip asset inclusion during installation when assets don't exist Jan 10, 2020
@aldesantis aldesantis changed the title Skip asset inclusion during installation when assets don't exist Skip asset inclusion during installation when the assets don't exist Jan 10, 2020
@elia
Copy link
Member

elia commented Jan 17, 2020

We should add some options to the command I thinks, like: --skip-assets or --skip-frontend-assets, those should work for both the updates and the extension generation.

@spaghetticode
Copy link
Member

What about adding a conditional when loading the files instead?

When generating a new extension one may not know from the beginning if assets will be needed... when updating an extension one would need to check if assets files exist and choose the right generator option - but there's still a chance that some manual tweaking would be required, as JS files may be there and CSS not 🤔

If assets need to be introduced later, one may not know that the easiest way to have them loaded is to rerun the solidus generator, and so would end up spending time trying to figure out the problem and how to load them.

I think that having the loaders always in place with conditional loading helps with consistency and would avoid much (if not all) active developer intervention.

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

No branches or pull requests

4 participants