How to use the args.config function in args

To help you get started, we’ve selected a few args examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dkundel / node-env-run / bin / node-env-run.js View on Github external
const { spawn } = require('child_process');

const args = require('args');
const dotenv = require('dotenv');

const { logger } = require('../lib/utils');

const cwd = process.cwd();

args
  .option(['f', 'force'], 'Temporarily overrides existing env variables with the ones in the .env file')
  .option(['E', 'env'], 'Location of .env file relative from the current working directory', '.env')
  .option('verbose', 'Enable verbose logging')
  .option('encoding', 'Encoding of the .env file', 'utf8');

args.config.value = '