In my package.json file I have declared dependencies which one from public registry and second from private registry (Artifactory in this case).
"dependencies": {
"vue": "^2.4.4", //public registry
"ce-ui": "http://myartifactory.com/artifactory/npm-local/ce-ui/-/ce-ui-0.0.2.tgz"
}
I'm looking for way to declare dependencies using caret or tidle e.g.
"dependencies": {
"vue": "^2.4.4",
"ce-ui": "^0.0.2"
}
Thank you in advance.
I recommend you to have a virtual repository in your Artifactory with two repos:
Then:
Replacing the default registry with your new local repository with this command:
npm config set registry http://<ARTIFACTORY_SERVER_DOMAIN>:8081/artifactory/api/npm/your-npm-virtual-repo-name
Deploy your packages to Artifactory. The first time you can upload the artifacts to artifactory manually or using this command in every project:
npm publish --registry http://<ARTIFACTORY_SERVER_DOMAIN>:8081/artifactory/api/npm/your-virtual-repo-name
Remove links in your package.json and replace with only the dependency name and version like:
"dependencies": {
"vue": "^2.4.4",
"ce-ui": "^0.0.2"
}
More info here: