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

Envdir-Based Environment Loader

Configure a Grunt workflow that loads environment variables for a staging target from envdir-style directories, then exposes a verification task that consumes the loaded values.

Capabilities

Directory-driven environments

  • Running the staging task chain reads files under config/envdir/staging/*, sets process.env.API_URL and process.env.DB_USER from matching filenames, and a follow-up task can read them without extra configuration. @test
  • Files placed inside nested directories under config/envdir/staging/ (e.g., config/envdir/staging/secret/IGNORED) are skipped and never added to process.env. @test
  • When process.env.PORT is already set before running the staging setup, that value remains unchanged unless an inline override is provided alongside the directory ingestion; other variables from the directory still load. @test

Implementation

@generates

API

module.exports = function (grunt) {
  // configures a staging target that loads environment variables from config/envdir/staging/*
  // optionally defines inline overrides for select variables such as PORT
  // registers a task chain (e.g., "staging") that loads the variables and a follow-up task that reads them
};

Dependencies { .dependencies }

grunt-env { .dependency }

Loads environment variables for Grunt tasks, including directory-based ingestion of files into process.env.

Version

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