tlm-npm-manager
Tool to manage npm packages to work with the TLMPartners registry.
Description
This package is designed to help reducing the boilerplate required to make an npm package able to work with the
TLMPartners registry.
Anyway it never performs the npm login against the registry as it is a long time process (matter of a few seconds,
but...). It is better to make in only once at the beginning of the tlm.yml file
aws codeartifact login --tool npm --repository tlm --domain tlm-dev --domain-owner 325258257585 --region us-east-2
Usage
Anyway some minimal boilerplate is still required to use this package.
Following content must be added to relative files.
.npmrc:
registry=https://tlm-dev-325258257585.d.codeartifact.us-east-2.amazonaws.com/npm/tlm/
package.json:
{
"devDependencies": {
"tlm-npm-manager": "1.0.0"
},
"scripts": {
"postinstall": "tlm-npm-postinstall"
}
}
Last issue the following commands.
aws codeartifact login --tool npm --repository tlm --domain tlm-dev --domain-owner 325258257585 --region us-east-2
npm install --prune
Versioning a package
Another usefull task performed by this package is helping on the versioning process.
The package we want to manage through tlm-npm-manager must use
semantic version.
We just need to manage major and minor version number (both in the package itself and in the packages using it as
dependency), tlm-npm-manager takes care to increase the patch version number through the tlm:publish script
(installed on our package.json file by tlm-npm-manager itself).