Skip to content

Commit

Permalink
fix: load version from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
yumetodo committed Jan 4, 2022
1 parent 44064b8 commit 150d512
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const Item = require("./item.js");
// eslint-disable-next-line no-unused-vars
const Comment = require("./comment.js");
const ImageManager = require("./image-manager.js");
const p = require('../package.json');

const token = process.env.QIITA_ACCESS_TOKEN;
const imagePathBase = "img";
Expand Down Expand Up @@ -69,7 +70,7 @@ if (token == null) {
console.error("Fail to find QIITA_ACCESS_TOKEN env");
} else {
program
.version("1.5.0")
.version(p.version)
.name("qiita_export_all")
.option("-u, --user-id <id>", "Qiita user id you want to download(default: the user who get QIITA_ACCESS_TOKEN).")
.option("-o, --output <path>", "Write output to <path> instead of current directory.")
Expand Down

0 comments on commit 150d512

Please sign in to comment.