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

Shared option merge for environment tasks

Create an environment setup for two build targets where shared options are merged after each target's own environment values.

Capabilities

Shared options applied last

  • Running the environment setup for the "dev" target leaves target values like API_URL=http://localhost:3000 intact while applying shared options afterward so COMMON_TOKEN=shared-token is present and APP_MODE ends as global-default even though the target defined APP_MODE=dev. @test

Target option overrides shared

  • The "prod" target carries its own options that override the shared APP_MODE, resulting in APP_MODE=production while still receiving the shared COMMON_TOKEN and keeping target data such as LOG_LEVEL=warn. @test

Non-environment options ignored

  • When the "prod" target enables an envdir-style flag (or another non-environment option), that control flag is not copied into process.env, but the merged environment values from the target data and options remain. @test

Implementation

@generates

API

module.exports = function configureEnvironment(grunt);

Dependencies { .dependencies }

grunt-env { .dependency }

Provides environment-merging tasks for the build tool.

Version

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