corsica-cli
Advanced tools
Comparing version 1.2.0 to 1.3.0
18
index.js
@@ -51,3 +51,3 @@ #!/usr/bin/env node | ||
.description('start the Corsica server') | ||
.option('-b, --background', 'run Corscia in the background') | ||
.option('-b, --background', 'run Corsica in the background') | ||
.action(helpful(async function (options) { | ||
@@ -64,2 +64,18 @@ | ||
program.command('restart') | ||
.description('restart the Corsica server') | ||
.option('-b, --background', 'run Corsica in the background') | ||
.action(helpful(async function (options) { | ||
await lifecycle.stop(); | ||
if (options.background) { | ||
await lifecycle.startInBackground(); | ||
} else { | ||
await lifecycle.start(); | ||
console.log(style.info('Press Ctrl+C to exit.')); | ||
} | ||
})); | ||
program.command('stop') | ||
@@ -66,0 +82,0 @@ .description('stop a running Corsica server') |
{ | ||
"name": "corsica-cli", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
14774
386