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

Projects
None yet
2 participants
@tivac
Copy link
Owner

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 tivac referenced this pull request Mar 28, 2019

Merged

fix: walk invalidated dependencies #573

5 of 9 tasks complete

@tivac tivac force-pushed the svelte-missing-classes branch from 1573de6 to 0537aac Mar 28, 2019

tivac added some commits Mar 28, 2019

feat: missing classes replaced with strings
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.
feat: replace invalid refs in early-outs
So that if you have {css.nope} but no <link> or <style> it still becomes "css.nope".
test: ensure that svelte works w/ rollup
Just for completeness sake, mostly
test: change read-dir.js output
... and all the snapshots that use that output
test: update svelte snapshot
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

This comment has been minimized.

Copy link

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

@tivac tivac merged commit 2084b62 into master Mar 28, 2019

3 of 7 checks passed

continuous-integration/travis-ci/push The Travis CI build is in progress
Details
Header rules No header rules processed
Details
Pages changed 1 new file uploaded
Details
Redirect rules No redirect rules processed
Details
Mixed content No mixed content detected
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@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
You can’t perform that action at this time.