CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-grunt-env

tessl install tessl/npm-grunt-env@1.0.0

Grunt 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%

task.mdevals/scenario-3/

Runtime Environment Presets

Configure a build task that applies environment variable presets from literal entries and runtime-evaluated functions, with a default task chaining both presets.

Capabilities

Static preset sets literal values

  • After running the default task, process.env.APP_MODE equals static-mode because the static preset applies a literal entry. @test

Function-based values evaluate at runtime

  • Running the dynamic preset twice in the same process yields two different values for process.env.RUN_ID, demonstrating the value is produced by a function executed each run. @test

Functions can combine prior env

  • After the default task runs the static preset and then the dynamic preset, process.env.COMBINED_FLAG equals static-mode-combined, showing the function reads an existing env var during evaluation. @test

Implementation

@generates

API

/**
 * Configures the task runner to load static and dynamic environment presets and exposes a default task.
 * The default task runs the static preset first and the dynamic preset second.
 * @param {object} taskRunner - Build tool instance that supports task registration.
 */
module.exports = function configure(taskRunner);

Dependencies { .dependencies }

grunt-env { .dependency }

Provides preset-driven environment variable loading with support for literal entries and functions evaluated at task runtime. @satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/grunt-env@1.0.x
tile.json