postcss / postcss-cli

CLI for postcss
Other
836 stars 93 forks source link

How to call cli with file config? #407

Closed HypeNeutron closed 2 years ago

HypeNeutron commented 2 years ago

On mention that I'll to use To call postcss.config.js or it automatically?

in it I mention that from my autoprefixer plugin problem complaint in SASS compiler indent problem in

sass --style=compressed

This is my CLI

postcss --use autoprefixer -b 'last 5 versions' assets/css/main.comp.css -o assets/css/main.prefix.css

This is my config in autoprefixer I don't know how correctly used but after created, but it doesn't work

module.exports = {
  plugins: [require('autoprefixer')({ cascade: false })],
};
RyanZim commented 2 years ago

The postcss.config.js will be used automatically. If you have autoprefixer specified in your postcss.config.js, you don't need to specify it on the command line.

Also, you'll need to specify your desired browsers someplace else, there is no -b option. See https://github.com/postcss/autoprefixer#browsers for options.

RyanZim commented 2 years ago

So your CLI command should just be postcss assets/css/main.comp.css -o assets/css/main.prefix.css

HypeNeutron commented 2 years ago

So your CLI command should just be postcss assets/css/main.comp.css -o assets/css/main.prefix.css

Ok that it work! But I'm facing another syntax SASS complaint, something else instead 😂 👌