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-5/

Build Task Environment Targets

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.

Capabilities

Development target applies base vars

  • Running 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. @test
  • The development task computes a PORT value via a function when process.env.PORT is not already set, defaulting to "3000". @test

Production target uses independent values

  • Running grunt prod sets NODE_ENV to production and APP_DEBUG to "0", independent of any prior development run. @test
  • The production task produces a RELEASE value derived from the package version string (e.g., "v1.2.3") via a function executed at task time. @test

Target switching resets values

  • After grunt 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

Implementation

@generates

API

module.exports = function (grunt);

Dependencies { .dependencies }

Task runner { .dependency }

Provides task execution framework for applying configuration targets. @satisfied-by

Environment configuration plugin { .dependency }

Loads environment variable definitions from configured targets before running other tasks. @satisfied-by

Version

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