feature(cloudcmd) add env variable CLOUDCMD_OPEN

This commit is contained in:
coderaiser 2018-10-12 12:54:09 +03:00
parent 77862a55f6
commit 8db0a03081
4 changed files with 9 additions and 2 deletions

View file

@ -420,6 +420,7 @@ Here is description of options:
Some config options can be overridden with `environment variables` such: Some config options can be overridden with `environment variables` such:
- `CLOUDCMD_NAME` - set tab name in web browser - `CLOUDCMD_NAME` - set tab name in web browser
- `CLOUDCMD_OPEN` - open web browser when server started
- `CLOUDCMD_EDITOR` - set editor - `CLOUDCMD_EDITOR` - set editor
- `CLOUDCMD_COLUMNS` - set visible columns - `CLOUDCMD_COLUMNS` - set visible columns
- `CLOUDCMD_CONTACT` - enable contact - `CLOUDCMD_CONTACT` - enable contact

View file

@ -107,6 +107,11 @@
"value": "name-size-date-owner-mode", "value": "name-size-date-owner-mode",
"required": false "required": false
}, },
"CLOUDCMD_OPEN": {
"description": "open web browser when server started",
"value": "false",
"required": false
},
"CLOUDCMD_CONFIRM_COPY": { "CLOUDCMD_CONFIRM_COPY": {
"description": "confirm copy", "description": "confirm copy",
"value": "true", "value": "true",

View file

@ -76,7 +76,7 @@ const args = require('minimist')(argv.slice(2), {
auth : choose(env.bool('auth'), config('auth')), auth : choose(env.bool('auth'), config('auth')),
port : config('port'), port : config('port'),
online : config('online'), online : config('online'),
open : config('open'), open : choose(env.bool('open'), config('open')),
editor : env('editor') || config('editor'), editor : env('editor') || config('editor'),
packer : config('packer') || 'tar', packer : config('packer') || 'tar',
zip : config('zip'), zip : config('zip'),

View file

@ -11,7 +11,8 @@
"cloudcmd_import_url": "https://cloudcmd.herokuapp.com", "cloudcmd_import_url": "https://cloudcmd.herokuapp.com",
"cloudcmd_export": "true", "cloudcmd_export": "true",
"cloudcmd_export_token": "hello", "cloudcmd_export_token": "hello",
"cloudcmd_name": "Cloud Commander - Now" "cloudcmd_name": "Cloud Commander - Now",
"cloudcmd_open": "false"
}, },
"engines": { "engines": {
"node": "8" "node": "8"