Skip to content

postcss in install instructions #45

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

Closed
receter opened this issue Oct 18, 2024 · 7 comments
Closed

postcss in install instructions #45

receter opened this issue Oct 18, 2024 · 7 comments

Comments

@receter
Copy link

receter commented Oct 18, 2024

Is postcss still a dependency? Its's no in the peerDependencies, but it is in the install script in the README.

I am asking because I am not sure if I really need to install it. It works without explicitly installing it for me, but I use Vite so postcss is installed because of Vite.

Thank you, I really appreciate you published this plugin!

@Siilwyn
Copy link
Owner

Siilwyn commented Oct 18, 2024

PostCSS is listed in the peer dependencies:

"prettier": "3.x"

Or do you mean something else?

@receter
Copy link
Author

receter commented Oct 19, 2024

Hmm, then it's a issue with my eyes. Sorry for the inconvenience.

@receter receter closed this as completed Oct 19, 2024
@receter receter reopened this Oct 19, 2024
@receter
Copy link
Author

receter commented Oct 19, 2024

This is prettier right?

@receter
Copy link
Author

receter commented Oct 19, 2024

#46

@Siilwyn
Copy link
Owner

Siilwyn commented Oct 19, 2024

Oh whoops sorry about that. Regarding postcss, I never call postcss directly from this codebase and it's a peer dependency of css-declaration-sorter (which is a dependency here). Peer dependencies are automatically installed with npm 7>, if it isn't already in the parent tree.

So yes it can be removed from the readme instructions I think, this is the tree I get with just installing this package:

└─┬ prettier-plugin-css-order@2.1.2
  ├─┬ css-declaration-sorter@7.2.0
  │ └─┬ postcss@8.4.47
  │   ├── nanoid@3.3.7
  │   ├── picocolors@1.1.1
  │   └── source-map-js@1.2.1
  ├─┬ postcss-less@6.0.0
  │ └── postcss@8.4.47 deduped
  ├─┬ postcss-scss@4.0.9
  │ └── postcss@8.4.47 deduped
  └── prettier@3.3.3

@receter
Copy link
Author

receter commented Oct 19, 2024

Ok, this makes sense. It didn't work for me because I accidentally had legacy-peer-deps=true in my global .npmrc, glad I found this… must have been there a while already 😬

@Siilwyn
Copy link
Owner

Siilwyn commented Oct 21, 2024

Ah good find! Thank you for the thoughts on this I've removed postcss from the installation instruction too since it might be confusing and isn't needed in most cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants