-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·27 lines (22 loc) · 727 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env node
'use strict';
const Commander = require('commander');
const packageJson = require('./package.json');
const createEnvFromProcessVars = require('./src/createEnv');
const createEnv = new Commander.Command(packageJson.name);
createEnv
.version(packageJson.version)
.description(packageJson.description)
.option('--env [value]')
.option('--env-file [value]')
.option('--env-prefix [value]')
.option('--use-default-prefix')
.option('--debug')
.parse(process.argv);
createEnvFromProcessVars(process.env, {
name: createEnv.env,
debug: createEnv.debug,
prefix: createEnv.envPrefix,
fileName: createEnv.envFile,
useDefaultPrefix: createEnv.useDefaultPrefix
});