DEV Community

Discussion on: Re-use personal modules via NPM/Yarn?

Collapse
 
dmfay profile image
Dian Fay

If you want to use npm to manage something you have to factor it out into a self-contained package. Once you do that you can use peerDependencies to ensure that sequelize or what have you has to be present alongside your "commons" library, but making it its own package is non-negotiable. If you're routinely extending your models with new fields it will probably be more trouble than it's worth.