✨ User folder name if none provided
This commit is contained in:
@@ -135,10 +135,6 @@ class App
|
|||||||
{
|
{
|
||||||
config.name = args._[0]
|
config.name = args._[0]
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
config.name = 'No name'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config.host === '')
|
if(config.host === '')
|
||||||
|
|||||||
+9
-1
@@ -36,7 +36,15 @@ class Watcher
|
|||||||
// Connect event
|
// Connect event
|
||||||
this.socket.on('connect', () =>
|
this.socket.on('connect', () =>
|
||||||
{
|
{
|
||||||
this.socket.emit('start_project', { name: this.config.name, path: this.path, excludeRegex: '' + this.excludeRegex })
|
let name = this.config.name
|
||||||
|
|
||||||
|
// If no name, use folder name
|
||||||
|
if(!name)
|
||||||
|
{
|
||||||
|
name = path.parse(this.path).name
|
||||||
|
}
|
||||||
|
|
||||||
|
this.socket.emit('start_project', { name, path: this.path, excludeRegex: '' + this.excludeRegex })
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
if(this.config.debug)
|
if(this.config.debug)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ Arguments list
|
|||||||
|---|---|
|
|---|---|
|
||||||
|parameter|`--name`|
|
|parameter|`--name`|
|
||||||
|shortcut|`-n`|
|
|shortcut|`-n`|
|
||||||
|default value|*(string)*`No name`|
|
|default value|*(string)* folder name|
|
||||||
|description|Project name<br>(you can simply add a string after `keppler` keyword like `keppler "My project"`)|
|
|description|Project name<br>(you can simply add a string after `keppler` keyword like `keppler "My project"`)|
|
||||||
|
|
||||||
|||
|
|||
|
||||||
|
|||||||
Reference in New Issue
Block a user