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

Use postcss-nested and postcss-safe-parser instead of styled-components fork and pass filename to postcss #192

Merged
merged 6 commits into from
Jul 28, 2017

Conversation

emmatown
Copy link
Member

What:

Use postcss-nested and postcss-safe-parser instead of styled-components fork and pass the filename to postcss with the from option

I also moved the object parser into the src since we need to change it for #189

Why:

#188

How:

Checklist:

  • Documentation
  • Tests
  • Code complete

I'm pretty sure I'm passing the filename to postcss incorrectly since I don't think the .browserslistrc file is being read

Closes #188

@codecov-io
Copy link

codecov-io commented Jul 27, 2017

Codecov Report

Merging #192 into master will decrease coverage by 0.72%.
The diff coverage is 77.27%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #192      +/-   ##
=========================================
- Coverage   89.13%   88.4%   -0.73%     
=========================================
  Files          22      23       +1     
  Lines         847     880      +33     
  Branches      219     231      +12     
=========================================
+ Hits          755     778      +23     
- Misses         70      77       +7     
- Partials       22      25       +3
Impacted Files Coverage Δ
src/parser.js 100% <100%> (ø) ⬆️
src/babel.js 98% <100%> (+0.02%) ⬆️
src/obj-parse.js 69.69% <69.69%> (ø)
src/react/index.js 100% <0%> (ø) ⬆️

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 18f91da...8c82626. Read the comment docs.

@tkh44 tkh44 merged commit 477c715 into master Jul 28, 2017
@ai
Copy link

ai commented Jul 28, 2017

@mitchellhamilton great work! Thanks. I will announce it in PostCSS twitter after the release.

@tkh44 @mitchellhamilton also you can clean up code a little:

function stringifyCSSRoot (root) {
  return root.nodes.map((node, i) => {
-    let str = ''
-    stringify(node, x => {
-      str += x
-    })
-    return str
+   node.toString()
  })
}

In this case you even don’t need to import postcss/lib/stringify.

@emmatown emmatown deleted the improve-parser branch July 28, 2017 22:12
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.

Pass from option to PostCSS
4 participants