-
-
Notifications
You must be signed in to change notification settings - Fork 188
Upgrade to postcss 5.x #202
Comments
Are we just waiting for some plugins to upgrade? If so, can we get a checklist of the ones remaining? |
Autoprefixer, for one - waiting on that to be v6 |
cssnano 3 will support PostCSS 5. Coming shortly after autoprefixer 6. |
It looks like Autoprefixer 6.0.1 and cssnano 3.0 are now released. Is there anything else holding us back now? |
I can handle all updates except postcss-pseudoelements. |
@MoOx you can cross postcss-pseudoelements off the list now. See https://github.com/axa-ch/postcss-pseudoelements/releases/tag/3.0.0 |
It's not that easy. I think I can't just "merge" yet, because cssnext runners are sync, and plugins like cssnano are now async only. That said, I will merge & publish all pr tomorrow so this branch can work if used just as a plugin. |
@MoOx I only care about the plugin use-case myself. Is there anything else I can do to help? |
What do you think about creating a postcss-cssnext that will "just" handle all features plugins but no options like import, url, cssnano ? I can create a repo here so we can extract the main code. |
I like the idea of If I understand correctly, the project goals of cssnext are to write future CSS syntax, today. Seeing as autoprefixer enables you to do that w/o worrying about vendor prefixes, I definitely feel that it belongs in the cssnext project goals; thus, the That's my $0.02. |
It seems to me that import, url, cssnano, autoprefixer are falling out of the scope of this plugin's objective. |
I think the best thing is to limit scope where possible. For example, https://github.com/jakubpawlowicz/clean-css has a Options like import, url and compress don't contribute to cssnext's scope, I feel. They are a nice convenience if you want to get up and running quickly, but they are not cssnext's modus operandi, which is to polyfill future capabilities of the CSS specification. But I agree with @jedmao, the inclusion of autoprefixer should still make the cut because it ensures that the correct vendor prefixes are applied. |
cssnext was first designed when was not widely used, and so when no ones was still using postcss directly via a runner. That's why there is "so many" features, like imports, url,... $ cssnext input.css > output.css That's something no other tool simply bring as I am writing. |
All of that makes sense to me. 👍 |
Yep, options like import, url and cssnano should be excluded from cssnext. |
postcss-cssnext is almost ready. There is still a minor warning, but we will find the culprit. For difference, checkout the README and don't hesitate to provide feedback on the explanation I added. cssnext itself will need a major breaking change in the API so we can deliver an upgrade, because cssnano is an async plugin, and cssnext api is currently sync only. cssnext 2.0 will use postcss-cssnext under the hood. |
I've been struggling with this half day
didn't work so I cloned the repo and built it using npm install
On the repo page it doesn't say that it's not ready or not working I'm using this template
In the config I changed this
to this:
and it looks like it's still not working c:\Users\PW\desktop\repos\react\tools\config.js:95 TypeError: require(...) is not a function
npm ERR! Windows_NT 6.1.7601 npm ERR! Please include the following file with any support request: |
@DVLP you need to |
@jedmao That was my starting point. Then I was getting this error postcss/postcss#531 So it looks like cssnext is outdated and it will not work with postcss 5. That's why I was hoping to get postcss-cssnext running. Currently I develop with most bootstrap styles missing and hope to fix it tomorrow. |
@DVLP yeah. cssnext doesn't support PostCSS 5.0 yet, so you have to use 4.x plugins until it does. postcss-cssnext is almost ready though. Just waiting for the pleeease-filters plugin to upgrade to PostCSS 5.0 and we can pull the switch. |
Cool, I can't wait for that. I'm just working on a test project which needs to be ready for tomorrow to get a React contract so probably will have to use the latest 4.x version for now. |
We are waiting for @iamvdo to merge & release this PR iamvdo/pleeease-filters#12 |
postcss-cssnext is out https://github.com/cssnext/postcss-cssnext/releases/tag/2.0.0 Next version of cssnext will use this plugin as a legacy interface. |
@MoOx Great work. 👍 |
You can thanks @jedmao for this. |
@jedmao Thanks! Great work. 👍 |
Is there any problems with this issue? |
My problem is that a day only contains 24h and I have to keep some to sleep :) |
(No problem, I am on it since yesterday) |
Are PR welcome? |
Sadly, it's not that simple and there is a lot of work to do to offer a good upgrade experience. |
I am currently making a monorepo with postcss-cssnext and legacy/cli cssnext package. Sorry for taking so long. Life can be complicated sometimes. |
I changed my mind and think it's better to keep things simple. So I will close this issue in favor of the convergence #208 |
Most plugins are ready but there is still some work to prepare.
The text was updated successfully, but these errors were encountered: