Is there a mechanism in npm like parent pom in Maven. The goal is to have a common base configuration for scripts, dependencies, devDependencies. Not based on templates like yeoman or so, but based on a parent version. So that, any project that changes his parent version gets the changes in this parent automatically.
Can you point me to hints to achieve this?
Thanks!
The solution The central build script package can provide a set of shared partial package. json files. The monorepo packages can then declare that they inherit from those package.
Description. Workspaces is a generic term that refers to the set of features in the npm cli that provides support to managing multiple packages from your local file system from within a singular top-level, root package.
package. json file locates in project root and contains information about your web application. The main purpose of the file comes from its name package, so it'll contain the information about npm packages installed for the project.
Currently there is no built-in npm mechanism to achieve this, and there's not likely to be one in the future.
See the discussion here and this comment particularly.
We built https://github.com/Cosium/dry-dry.
Its only purpose is to add package.json inheritance capability.
It delegates all commands to npm.
The documentation is still in early stage, but it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With