tessl install tessl/npm-grunt-env@1.0.0Grunt plugin for specifying environment variable configurations in task chains
Agent Success
Agent success rate when using this tile
81%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.99x
Baseline
Agent success rate without this tile
82%
Configure a Grunt helper that merges environment values from a config file and inline defaults without clobbering existing settings. It should expose two environment targets, defaults and production, that can be run to populate process.env. Both targets should read key/value pairs from config/env.json before applying their conditional rules.
process.env.LOG_LEVEL="warn" and no API_BASE, running the defaults target leaves LOG_LEVEL unchanged and sets API_BASE to http://localhost:4000. @testprocess.env.NODE_ENV="staging" and FEATURE_FLAG unset, running the production target updates NODE_ENV to production but leaves FEATURE_FLAG undefined. @testconfig/env.json containing { "PORT": "9000", "SERVICE_NAME": "billing" } and process.env.SERVICE_NAME preset to frontend, running the production target yields PORT="9000" and SERVICE_NAME="billing" while preserving any other preexisting env entries. @test@generates
/**
* Registers environment targets for conditional merging of process.env values.
* @param {import('grunt')} grunt - Grunt instance used to configure and run tasks.
*/
module.exports = function configureEnv(grunt);Grunt plugin for applying environment configurations with conditional merges.