-
Notifications
You must be signed in to change notification settings - Fork 13
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
Build component with PostCSS #19
Conversation
"autoprefixer": "^6.0.3", | ||
"postcss": "^5.0.8", | ||
"postcss-bem-linter": "^1.1.0", | ||
"postcss-calc": "^5.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Button
is not using postcss-calc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, we should really only use the plugins that each package uses.
@@ -1,4 +1,4 @@ | |||
/** @define Button; use strict */ | |||
/** @define Button */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does postcss-bem-linter
always run in "strict mode"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you have to opt out of it with 'weak'
I like this approach! |
I've built tens rather than hundreds before and it always seems to be fast. PostCSS claims to be one of the faster processors. One thing I like here is that each package will compile with just the plugins it needs but makes it very easy for people to add more plugins should they need them. |
I think moving all the packages into a monorepo should be considered while doing this. Individual components can still be published to their separate npm packages. But having to maintain the toolchain across lots of repos is going to be a hassle for you. |
I agree, it would make this easier if we were happy to give up building of individual components. |
Closing this in favour of the mono-repo approach in progress at suitcss/suit/issues/109 |
So this is a stab at building a component with PostCSS in response to - suitcss/preprocessor#11. It emits warnings to the console if the conformance fails, but we can also configure this to throw an error if needs be.
Hopefully thepostcss-config.js
could be dropped into each component and just work.Each component can use just the plugins it requires.
cc @timkelty @giuseppeg