{"repo":"marcocesarato/dotenv-mono","free":true,"listed":false,"github":"https://github.com/marcocesarato/dotenv-mono","clone":"git clone https://github.com/marcocesarato/dotenv-mono.git","description":"This package permit to have a centralized dotenv on a monorepo. It also includes some extra features such as manipulation and saving of changes to the dotenv file, a default centralized file, and a file loader with ordering and priorities.","language":"TypeScript","stars":56,"topics":["monorepo","development","dotenv","environment","local","production","edit","env","mono","packages"],"license":"GPL-3.0","category":"saas-starters-boilerplates","readme_excerpt":"Dotenv mono If this project has helped you out, please support us with a star 🌟 📘 Description What is this? To prevent code duplication and enhance re-usability, a centralized configuration including all of your environment variables might be handy. Rather of generating a .env file for each package, we may utilize a single .env file at the project's root. This is a package that allows monorepo applications and packages to share and load a centralized dotenv. It's based over dotenv package. It also includes some extra features such as manipulation and saving of changes to the dotenv file, a default centralized file, and a file loader with ordering and priorities. The plugin dotenv-expand is enabled by default. Structure Example How it works? The package search the first .env file, matching with some priority criteria, by walking up the parent directories. Priorities Starting from the current process directory, this package finds the first file that matches the best filepath and filename criteria with the highest priority. The greater the depth of the up folder, the lesser its priority. The priority can be customized on the configuration with the priorities property, see the example below on the usage section. Note: The allowed values for NODE ENV are usually test , development and production . Priority Filename -------- ------------------------ 75 .env.$(NODE ENV).local 50 .env.local 25 .env.$(NODE ENV) 1 .env Example Given the following folder structure with dotenv files: H","default_branch":null,"files":null,"tree":[],"storefront":"/r/marcocesarato","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/marcocesarato/dotenv-mono/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."}