Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

peerDependencies #25

Closed
monolithed opened this issue Sep 7, 2015 · 5 comments
Closed

peerDependencies #25

monolithed opened this issue Sep 7, 2015 · 5 comments

Comments

@monolithed
Copy link

I propose to use postcss as peerDependency.
It seems more consistent with npm 3.

@jonathantneal
Copy link
Collaborator

@monolithed, you can require('precss') and use PreCSS without require('postcss'), since PostCSS plugins are given a mirrored process method.

In other words, precss.process(YOUR_CSS, YOUR_OPTIONS) mirrors PostCSS’ process method.

Does this answer your concern, or do I not understand something about peerDependency?

@monolithed
Copy link
Author

@jonathantneal, I mean flat directory structure.
For example:

➜ npm2 install grunt-postcss precss
➜ tree -d node_modules
....
├── precss
│   ├── node_modules/postcss
│   ├── node_modules/postcss-custom-properties
...
├── grunt-postcss
│   ├── node_modules/postcss
...

➜ npm3 install grunt-postcss precss
➜ tree -d node_modules
....

grunt-postcss
postcss
precss
postcss-custom-media
postcss-custom-properties
rgb
source-map
....

In other words peerDependencies allow to exclude duplication of packages.

PS: Actually, I've another issue for grunt-postcss

@jonathantneal
Copy link
Collaborator

I believe peerDependencies are now deprecated.

@monolithed
Copy link
Author

The previous behavior of peerDependencies is now obsolete.
For more details npm/npm#6565 (comment)

@jonathantneal
Copy link
Collaborator

Closing this due to inactivity.

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

No branches or pull requests

2 participants