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

feat: replacing missing css.fooga with stringified version #574

Merged
merged 6 commits into from Mar 28, 2019

Conversation

@tivac
Copy link
Owner

@tivac tivac commented Mar 28, 2019

Description

When a {css.fooga} reference (or just css.fooga in <script> blocks) is found, it's now replaced with "css.fooga".

Motivation and Context

So that svelte generates less code and the code it does generate doesn't explode. There's still strict mode if you want explosions though!

This helps #571 but I'm not sure it fixes it completely.

How Has This Been Tested?

Added tests!

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
tivac added 6 commits Mar 28, 2019
So that there's less JS errors and it's easier to fix up the broken things.

BREAKING CHANGE: Previously missing css.fooga references would be left as-is, now they're wrapped in quotes to prevent them from causing JS errors. If you want missing classes to break things you should enable strict mode.
So that if you have {css.nope} but no <link> or <style> it still becomes "css.nope".
Just for completeness sake, mostly
... and all the snapshots that use that output
Now that <script> isn't injected any more
@tivac tivac force-pushed the svelte-missing-classes branch from 0537aac to 6e4d2c7 Mar 28, 2019
@TravisBuddy
Copy link

@TravisBuddy TravisBuddy commented Mar 28, 2019

Hey @tivac,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: f9517d70-5158-11e9-ad12-835a6074a428

Loading

@tivac tivac merged commit 2084b62 into master Mar 28, 2019
6 of 7 checks passed
Loading
@tivac tivac deleted the svelte-missing-classes branch Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants