postcss / postcss-cli

CLI for postcss
Other
840 stars 93 forks source link

PostCSS CLI and Autoprefixer not prefixing my css file #341

Closed Johnny99211 closed 4 years ago

Johnny99211 commented 4 years ago

I've installed PostCSS and Autoprefixer like this because I want to prefix my .css files:

I've tried postcss-cli and postcss-cli-simple but both not working:

npm install postcss-cli-simple autoprefixer -g
npm install postcss-cli autoprefixer -g

After a successful install, I moved into the folder where both libs where installed in:

cd /usr/local/bin

Now I've called postcss with the correct --use option to prefix my .css file but the generated file looks exactly like the source - no prefixes - nothing. I've tried out everything and also postcss-cli but the result is all the same...

Source menu.css:

#home {
  display: flex;
  transition: 1s;
}

Target file test.css:

#home {
  display: flex;
  transition: 1s;
}

Command which should prefix the content:

postcss --use autoprefixer -o /Applications/MAMP/htdocs/wp-content/plugins/test/assets/css/admin/test.css /Applications/MAMP/htdocs/wp-content/plugins/test/assets/css/admin/menu.css

I'm getting no errors and the files get's successfully generated but the content is untouched. Any ideas?..

Thanks!

RyanZim commented 4 years ago

Dupe of https://github.com/postcss/autoprefixer/issues/1357.