intools-cli 1.0.3 → 1.0.4
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/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,11 +6,15 @@ const create_1 = require("./commands/create");
|
|
|
6
6
|
const build_1 = require("./commands/build");
|
|
7
7
|
const pack_1 = require("./commands/pack");
|
|
8
8
|
const dev_1 = require("./commands/dev");
|
|
9
|
+
const fs_1 = require("fs");
|
|
10
|
+
const path_1 = require("path");
|
|
11
|
+
// 读取 package.json 获取版本号
|
|
12
|
+
const pkg = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, '..', 'package.json'), 'utf-8'));
|
|
9
13
|
const program = new commander_1.Command();
|
|
10
14
|
program
|
|
11
15
|
.name('intools')
|
|
12
16
|
.description('InTools 插件开发 CLI 工具')
|
|
13
|
-
.version(
|
|
17
|
+
.version(pkg.version);
|
|
14
18
|
program
|
|
15
19
|
.command('create <name>')
|
|
16
20
|
.description('创建新插件项目')
|