Proposal: publish service and library seperately
See original GitHub issueI am currently working on adding the library part of polyfill-service on a project and running into some difficulties with deploying my work due to compilation issues around node-zopfli
- although my code and the polyfill-service code I want to use do not actually need it.
project@1.0.0 ~/project
└─┬ polyfill-service@3.20.2
└─┬ shrink-ray@0.1.3 # imported at service/index.js#7
└── node-zopfli@1.4.0
Diving into the source I noticed dependencies for both the polyfill.io service and the underlying are managed in one manifest file. Also, both parts are published via the same npm package.
I propose splitting service and library into distinct packages like this to avoid installing the sum of all dependencies of all sub projects at every dependent.
packages
├── polyfill-service # publishes to polyfill-service
└── polyfill-library # publishes to polyfill-library
polyfill-service
would depend on polyfill-library
and expose it to maintain backward compat for the time being. Interested consumers could install polyfill-library
and avoid the dependencies of polyfill-service
this way. Also this would lend itself to new interfaces to the logic of polyfill-library
- think polyfill-cli
.
The entire thing could be managed via lerna
. I’be happy to lend a hand. Thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
This has been done. The library is at https://github.com/Financial-Times/polyfill-library and the service is at https://github.com/Financial-Times/polyfill-service
@SebastianS90 This already underway via https://github.com/Financial-Times/polyfill-service/pull/1267