postcss / postcss-cli

CLI for postcss
Other
836 stars 93 forks source link

How to use "--config" ? #353

Closed MEChasle closed 3 years ago

MEChasle commented 3 years ago

Hello, I use postcss.config.js and it works fine. I try to use npx postcss my-file-input.css -o output/directory --config my.config.js, but I have the message below.

You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.

Between this two use cases, just the name of config file has changed. Do I use --config correctly ?

Thanks for your answer. Regards

RyanZim commented 3 years ago

--config specifies the directory to look for the postcss.config.js in. You cannot use a filename like my.config.js, the config file must be postcss.config.js.

MEChasle commented 3 years ago

Thanks for your precision. Is it scheduled to use another name for the config file ?

RyanZim commented 3 years ago

No, we do not plan to allow changing the filename, for compatibility with the rest of the postcss ecosystem