CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-grunt-env

Grunt plugin for specifying environment variable configurations in task chains

81

0.98x
Overview
Eval results
Files

rubric.jsonevals/scenario-6/

{
  "context": "Evaluates how the solution uses grunt-env to load staging environment variables from an envdir-style directory and wire them into a Grunt task chain without manual file parsing. Emphasis is on the plugin's env multi-task, envdir option, and directives to preserve or override specific variables.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Load plugin",
      "description": "grunt-env is loaded (e.g., grunt.loadNpmTasks('grunt-env')) and the env multi-task is invoked in the staging chain before the follow-up verification task.",
      "max_score": 20
    },
    {
      "name": "Envdir target",
      "description": "The env:staging target uses src pointing at config/envdir/staging/* with options.envdir set to true so filenames become variable names and file contents become values.",
      "max_score": 30
    },
    {
      "name": "Map values",
      "description": "API_URL and DB_USER are provided by env:staging through envdir ingestion (not manual fs reads) and are available to the subsequent task via process.env after env runs.",
      "max_score": 20
    },
    {
      "name": "Skip nested",
      "description": "Envdir mode is configured non-recursively (e.g., glob ending in /* with options.envdir) so files in nested directories are ignored rather than turned into environment variables.",
      "max_score": 10
    },
    {
      "name": "Preserve PORT",
      "description": "Configuration leverages grunt-env directives (such as options.add/options.replace) or omits a PORT entry so an existing process.env.PORT stays unchanged unless an explicit inline override is provided through the plugin config.",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-grunt-env

tile.json