fdb2 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/fdb2.js +10 -0
- package/package.json +1 -1
package/bin/fdb2.js
CHANGED
|
@@ -57,6 +57,10 @@ switch (command) {
|
|
|
57
57
|
case 'restart':
|
|
58
58
|
restartProject();
|
|
59
59
|
break;
|
|
60
|
+
case '-v':
|
|
61
|
+
case '--version':
|
|
62
|
+
showVersion();
|
|
63
|
+
break;
|
|
60
64
|
default:
|
|
61
65
|
showHelp();
|
|
62
66
|
break;
|
|
@@ -307,6 +311,12 @@ function restartProject() {
|
|
|
307
311
|
startProject();
|
|
308
312
|
}
|
|
309
313
|
|
|
314
|
+
// 显示版本号
|
|
315
|
+
function showVersion() {
|
|
316
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(projectRoot, 'package.json'), 'utf8'));
|
|
317
|
+
console.log(pkg.version);
|
|
318
|
+
}
|
|
319
|
+
|
|
310
320
|
// 显示帮助信息
|
|
311
321
|
function showHelp() {
|
|
312
322
|
console.log('FDB2 Database Tool');
|