Open gucong3000 opened 6 years ago
I'm not sure that I like the idea of this. You always have to install the correct parser/syntax for the file you're dealing with, so I don't see the point of not requiring config to use them. That just makes the dependency implicit vs. explicit.
I want try to if it's possible to use this project instead of stylelint's CLI.
postcss src/**/* -u stylelint
Most parser/syntax are installed in stylelint.
You always have to install the correct parser/syntax
How about install built-in some of the most commonly used parser/syntax? convention over configuration
https://www.npmjs.com/package/postcss-syntax?activeTab=dependencies https://www.npmjs.com/package/postcss-less?activeTab=dependencies https://www.npmjs.com/package/postcss-scss?activeTab=dependencies
I don't want to bloat dependencies
I've chosen three smallest packages for you.
PostCSS isn't really something that has convention over configuration.
@ai I think we should do something for this.
I think PostCSS should be as popular as babel, So maybe we should learn something like babel-preset-env
.
I agree with @gucong3000. I can’t find a popular case when you don’t need a postcss-scss
to work with .scss
. Also it prevent many mistakes.
“There is no dumb users, there is only bad UX” :D
PostCSS isn't really something that has convention over configuration
Nope. it is PostCSS Core, which is JS API. Look for Autoprefixer. It has a lot of “convention over configuration”.
By default, it does absolutely nothing.
I think the biggest our mistake in PostCSS was not to create some PostCSS Pack with best practice and plugins set. Most of the users will have some out-of-box solution. The other will use Core with own plugins.
Unfortunately, users are really bad with selecting plugins. Most just don’t know about other solutions.
There is some information for postcss syntaxes.
packages | dependencies | languages |
---|---|---|
postcss-scss |
postcss |
SCSS |
postcss-sass |
gonzales-pe , postcss |
SASS |
postcss-less |
postcss@5.x.x |
LESS |
postcss-html |
htmlparser2 |
html, html-like |
postcss-markdown |
remark , remarkunist-util-find-all-after |
markdown |
postcss-styled |
null | template literals in js/ts |
postcss-jsx |
@babel/generator , @babel/parser , @babel/traverse , @babel/types |
object/template literals in js/ts |