Skip to content

Commit

Permalink
chore: Get CLI name & version from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Asha20 committed Oct 12, 2020
1 parent 2f7853d commit 4743aa0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test:unit:watch": "jest unit --watch",
"test:e2e": "jest e2e",
"watch": "tsc -p tsconfig.build.json --watch",
"build": "rimraf dist && tsc -p tsconfig.build.json && pkg --out-path bin .",
"build": "rimraf dist bin && tsc -p tsconfig.build.json && pkg --out-path bin .",
"release": "standard-version"
},
"husky": {
Expand Down
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { isRecipeFile, doesExist, isFolder } from "./commands/common";

export function main(args: string | string[]) {
const program = new Command();
program.version("1.0.0", "--version");
const pkg = require("../package.json");

program.name(pkg.name).version(pkg.version, "--version");

program
.command("compile <source> <destination>")
Expand Down

0 comments on commit 4743aa0

Please sign in to comment.