brick-engine-cli 1.0.11 → 1.0.12
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 +4 -1
- package/package.json +1 -1
- package/src/index.ts +6 -1
package/dist/index.js
CHANGED
|
@@ -8,11 +8,14 @@ const commander_1 = require("commander");
|
|
|
8
8
|
const init_1 = require("./commands/init");
|
|
9
9
|
const publish_1 = require("./commands/publish");
|
|
10
10
|
const chalk_1 = __importDefault(require("chalk"));
|
|
11
|
+
const fs_1 = require("fs");
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
11
13
|
function run() {
|
|
14
|
+
const pkg = JSON.parse((0, fs_1.readFileSync)(path_1.default.join(__dirname, "../package.json"), "utf-8"));
|
|
12
15
|
commander_1.program
|
|
13
16
|
.name("brick-engine-cli")
|
|
14
17
|
.description("CLI to scaffold Brick Engine projects")
|
|
15
|
-
.version(
|
|
18
|
+
.version(pkg.version);
|
|
16
19
|
commander_1.program
|
|
17
20
|
.command("init <name>")
|
|
18
21
|
.description("Initialize a new Brick Engine project")
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -3,12 +3,17 @@ import { initCommand } from "./commands/init";
|
|
|
3
3
|
import { publishCommand } from "./commands/publish";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import { readFileSync } from "fs";
|
|
6
|
+
import path from "path";
|
|
6
7
|
|
|
7
8
|
export function run() {
|
|
9
|
+
const pkg = JSON.parse(
|
|
10
|
+
readFileSync(path.join(__dirname, "../package.json"), "utf-8"),
|
|
11
|
+
);
|
|
12
|
+
|
|
8
13
|
program
|
|
9
14
|
.name("brick-engine-cli")
|
|
10
15
|
.description("CLI to scaffold Brick Engine projects")
|
|
11
|
-
.version(
|
|
16
|
+
.version(pkg.version);
|
|
12
17
|
|
|
13
18
|
program
|
|
14
19
|
.command("init <name>")
|