-
Notifications
You must be signed in to change notification settings - Fork 25
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
Deprecate in favour of postcss plugins or tools like cssnext #11
Comments
So I'm thinking that I suppose the main reason to use it would be to swap the existing packages over with little fuss, but it does mean each one would need several additional dependencies instead of just one. One nice touch of
A Thoughts? |
The benefits of picking a tool like |
I think |
Very good points. That kind of decides it. |
Has anyone tried to compile Suit Components with cssnext? If that didn't work for you, would it make sense to write a wrapper around it or a custom preprocessor using postcss to make suitcss/preprocessor backwards compatible? @necolas (Twitter) & others do you care about backwards compatibility? |
It has worked fine for me in the past, and I did do it that way for a while. Once I realised I only needed a handful of the actual plugins in |
Same for me, I have done it without complication, but currently use my own set of postcss plugins. |
I was thinking that maybe we can deprecate preprocessor and create a yeoman generator to create suitcss preprocessors like the following:
where plugins are custom plugins, or a bundle like cssnext, or the current set of suitcss plugins (rework-suit). |
Looking back on this, I think the idea of using just the plugins necessary is a good start. After all, cssnext is just a collection of all of those and they are maintained independently so we don't lose any maintenance overhead. This whole tool could be replaced with |
@simonsmith I'm good with that |
I like @simonsmith's initial thinking around constructing the exact pipeline each project needs, such that we can:
It would be great if it also supported agile development / watching with browsersync, etc. |
I think this should be as simple as possible, just a list of postcss plugins. Baking that stuff in seems way of out scope to me. |
@timkelty I'm a little surprised because you seem to like the idea here? I'm not necessarily leaning toward any one solution. I do like to have the ability to easily add features as they start to make sense in terms of maximizing productivity both for users and maintainers, and to switch out packages that are under performing or obsolete. Something in line what what is done in this article, Breaking up with Sass, seems like it serves as a good cross section for the various ideas discussed so far. |
Also seems like cssnext is moving to just a postcss plugin anyway - https://github.com/cssnext/postcss-cssnext#readme I vote deprecate this repo and all the components move to using postcss -u postcss-import -u autoprefixer -u postcss-custom-media -d build -o build.css Or include a config json file in each repo if that gets too unwieldy. |
For me the difference is including as part of the preprocessor vs. part of the testing suite. If we can get BS to pop open browsers at all different breakpoint widths when running a test, I'm all for that. |
@simonsmith the postcss-cli option sounds good to me. The other option would be to pick another task runner (Gulp, etc) and run Postcss through there. When it comes down to it, aren't we mostly just talking about what our test suite is going to run? It seems like most people using this would be feeding it into an existing postcss pipeline...could be wrong though? |
I think the focus of this issue is replacing this pre-processor with postcss. Implementing a browser testing solution is not trivial and is definitely a separate task. I think a good approach for now is get all the packages of the dead rework ecosystem. Thoughts? |
Just read up on it some more, and it seems like we can easily wrap postcss in gulp if we need to augment the workflow later on, so 👍 |
@simonsmith agreed - migration to Postcss should be top priority. As far as how to build Postcss, I think our viable options are:
I didn't include making a |
I'm not sure what advantage Also, in every project I've used SUIT in I've found there already tends to be a pipeline setup (be it I've kinda seen the
Agreed, scrap that idea |
@simonsmith Agreed about Gulp, just wanted to list our options. So I think we're on the same page? |
Sounds good to me. Maybe we can get a PR on one component to see how it works and discuss it there. |
+1 for @simonsmith's idea. |
Yesterday @giuseppeg and I had a discussion about how viable this is and what we'd lose (bower support, issues, PRs and git tags) and it seems like a lot to give up vs the gain. Plus the tooling for a monorepo isn't massively easy. I think we're leaning towards refactoring this tool to use a handful of PostCSS plugins directly. It could have the bem-linter rolled in, and perhaps even stylelint. Would also consider simplifying it by removing the minification option, and leaving that up to to existing build pipelines that most users should have already (cssnano spring to mind here). In fact we should be encouraging people to use their own pipelines, but by keeping this tool around we can quickly move the dev tools of all the packages over to Using Would make sense to manage the package from one single build tool. We could then deprecate/remove Here's our discussion from yesterday - https://gitter.im/suitcss/suit?at=564902c58b242470793dea82 But i think I'm sold on the refactor route |
@simonsmith @giuseppeg glad you guys discussed this, I've been leaning in this direction as well. Could a possible tradeoff be to maintain all the docs and tooling in the main SUIT repo, and have each package have the main repo as a dependency? |
No description provided.
The text was updated successfully, but these errors were encountered: