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

output { js, css, ast } from svelte.compile #1298

Merged
merged 3 commits into from
Apr 1, 2018
Merged

output { js, css, ast } from svelte.compile #1298

merged 3 commits into from
Apr 1, 2018

Conversation

Rich-Harris
Copy link
Member

Ref #795. This replaces the existing hodgepodge...

const { ast, code, map, css, cssMap } = svelte.compile(...);

...with something a bit saner:

const { ast, js, css } = svelte.compile(...);

js and css are both { code, map } objects.

The old properties are preserved (to the extent possible, by giving the css object String.prototype methods) in a way that should be non-breaking in all but the most edgy of cases (tested with rollup-plugin-svelte and svelte-loader). Once plugins have had a chance to update, we can start adding deprecation warnings, before a removal in v2.

Next up, #1257.

@codecov-io
Copy link

codecov-io commented Apr 1, 2018

Codecov Report

Merging #1298 into master will decrease coverage by <.01%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1298      +/-   ##
==========================================
- Coverage   91.66%   91.65%   -0.01%     
==========================================
  Files         122      122              
  Lines        4332     4339       +7     
  Branches     1367     1369       +2     
==========================================
+ Hits         3971     3977       +6     
  Misses        148      148              
- Partials      213      214       +1
Impacted Files Coverage Δ
src/css/Stylesheet.ts 90.1% <100%> (ø) ⬆️
src/generators/dom/index.ts 96.06% <66.66%> (ø) ⬆️
src/generators/server-side-rendering/index.ts 93.84% <75%> (ø) ⬆️
src/generators/Generator.ts 93.78% <90%> (-0.15%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae25641...0f5912f. Read the comment docs.

@Rich-Harris Rich-Harris mentioned this pull request Apr 1, 2018
8 tasks
@Rich-Harris Rich-Harris merged commit 0c9d703 into master Apr 1, 2018
@Rich-Harris Rich-Harris deleted the gh-795 branch April 1, 2018 20:43
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