Drop the version to something more realistic, then make the version command.

master
Zed A. Shaw 2 years ago
parent 9086f2fdf6
commit 6278e47308
  1. 15
      commands/version.js
  2. 2
      package.json

@ -0,0 +1,15 @@
import fs from "fs/promises";
import path from "path";
import url from "url";
export const description = "Prints out the version of the tool.";
export const options = [];
export const main = async (opts) => {
const pkgurl = url.parse(import.meta.url);
const pkgpath = path.parse(pkgurl.path);
const pkgfile = path.join(pkgpath.dir, "../package.json");
const info = JSON.parse(await fs.readFile(pkgfile));
console.log(info.version);
}

@ -1,6 +1,6 @@
{
"name": "ljsthw-bandolier",
"version": "1.0.1",
"version": "0.1.1",
"description": "Generates projects using the Bandolier educational framework.",
"main": "bando.js",
"bin": {

Loading…
Cancel
Save