✨ Send all files at start unless there is more files than the new argument limit
This commit is contained in:
+20
-15
@@ -71,19 +71,19 @@ class App
|
||||
})
|
||||
.option('exclude', {
|
||||
alias: 'e',
|
||||
describe: 'Files to exclude',
|
||||
describe: 'Files to exclude (glob pattern)',
|
||||
default:
|
||||
[
|
||||
'**/.DS_Store',
|
||||
'node_modules/**',
|
||||
'vendor/**',
|
||||
'.git',
|
||||
'.vscode',
|
||||
'.env',
|
||||
'.log',
|
||||
'**/node_modules/**',
|
||||
'**/vendor/**',
|
||||
'**/.git',
|
||||
'**/.vscode',
|
||||
'**/.env',
|
||||
'**/.log',
|
||||
'.idea/**',
|
||||
'*___jb_old___',
|
||||
'*___jb_tmp___'
|
||||
'**/*___jb_old___',
|
||||
'**/*___jb_tmp___'
|
||||
],
|
||||
type: 'array'
|
||||
})
|
||||
@@ -99,11 +99,11 @@ class App
|
||||
default: false,
|
||||
type: 'boolean'
|
||||
})
|
||||
.option('initial-send', {
|
||||
alias: 'i',
|
||||
describe: 'Send files in folder at start',
|
||||
default: false,
|
||||
type: 'boolean'
|
||||
.option('limit', {
|
||||
alias: 'l',
|
||||
describe: 'Limit of files above which nothing will be sent at start',
|
||||
default: 99,
|
||||
type: 'number'
|
||||
})
|
||||
.option('max-file-size', {
|
||||
alias: 'm',
|
||||
@@ -131,11 +131,16 @@ class App
|
||||
config.exclude = args.exclude
|
||||
config.open = args.open
|
||||
config.test = args.test
|
||||
config.initialSend = args['initial-send']
|
||||
config.limit = args.limit
|
||||
config.maxFileSize = args['max-file-size']
|
||||
config.server = args.server
|
||||
config.host = args.host
|
||||
|
||||
if(config.limit === -1)
|
||||
{
|
||||
config.limit = Infinity
|
||||
}
|
||||
|
||||
if(config.name === '')
|
||||
{
|
||||
if(args._.length > 0 && typeof args._[0] === 'string' && args._[0] !== '')
|
||||
|
||||
Reference in New Issue
Block a user