Grunt plugin for specifying environment variable configurations in task chains
81
Set up Grunt tasks that apply environment variable definitions from inline configuration targets (strings and runtime functions) so downstream tasks run with expected process.env values.
grunt dev sets NODE_ENV to development and APP_DEBUG to "1" based on the development configuration block before executing the next task in the chain. @testPORT value via a function when process.env.PORT is not already set, defaulting to "3000". @testgrunt prod sets NODE_ENV to production and APP_DEBUG to "0", independent of any prior development run. @testRELEASE value derived from the package version string (e.g., "v1.2.3") via a function executed at task time. @testgrunt dev followed by grunt prod, process.env reflects only the production target values (e.g., APP_DEBUG is "0" and no leftover development defaults remain). @test@generates
module.exports = function (grunt);Provides task execution framework for applying configuration targets. @satisfied-by
Loads environment variable definitions from configured targets before running other tasks. @satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-grunt-env