{"repo":"dennzimm/npmrc-replace-env","free":true,"listed":false,"github":"https://github.com/dennzimm/npmrc-replace-env","clone":"git clone https://github.com/dennzimm/npmrc-replace-env.git","description":"A utility for generating .npmrc files based on configuration template and environment variables.","language":"TypeScript","stars":26,"topics":["cli","config","env","generator","npmrc","automation","config-template","configuration","devops","environment-variables"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"npmrc-replace-env A utility for dynamically generating .npmrc files based on configuration and environment variables. Managing npm registry configurations and authentication tokens across different projects and environments can be cumbersome. This package aims to simplify this process by providing a utility that dynamically generates the .npmrc file based on a configuration file ( .npmrc.config ) and corresponding environment variables ( .env ). This approach prioritizes security, preventing inadvertent exposure of sensitive information, like auth tokens in your .npmrc file, in version control systems. Check out my article for a quick overview and insights about this utility here! Table of Contents - Installation - Usage - Configuration - Define Environment Variables in .env - Command Line Options - Contributing - License Installation Note : While installing the package is an option, it's important to note that it's not required to use the utility. The utility can be invoked directly with npx without installing the package. Usage Run the utility using npx: This will generate a .npmrc file (or override any existing .npmrc files) based on the configuration provided in a file named .npmrc.config . Configuration Create a file named .npmrc.config in the root of your project. This file should contain the configuration for your .npmrc file. The utility will replace placeholders in this configuration with corresponding environment variables. Example .npmrc.config : In this example, t","default_branch":null,"files":null,"tree":[],"storefront":"/r/dennzimm","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dennzimm/npmrc-replace-env/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}