From 8f9327f23ccc34fd99f8e1f5c95d991afb5ffb7b Mon Sep 17 00:00:00 2001 From: yutent Date: Tue, 11 Oct 2022 15:39:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 7 +++++++ lib/demo-config.js | 2 +- lib/demo-js.js | 2 +- package.json | 5 ++++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 3fb1ad1..93e7b49 100755 --- a/index.js +++ b/index.js @@ -20,6 +20,8 @@ import { writeStore } from './lib/demo-js.js' +const { version } = JSON.parse(fs.cat('./package.json')) + let args = process.argv.slice(2) function printHelp() { @@ -63,6 +65,11 @@ switch (args[0]) { } break + case '-v': + case '--version': + console.log('v' + version) + break + default: printHelp() break diff --git a/lib/demo-config.js b/lib/demo-config.js index 597a162..df002ae 100644 --- a/lib/demo-config.js +++ b/lib/demo-config.js @@ -16,7 +16,7 @@ export function writePackageJson(file) { build: 'vue-live build' }, dependencies: { - '@bytedo/vue-live': '^0.0.4' + '@bytedo/vue-live': '^0.0.5' } }), file diff --git a/lib/demo-js.js b/lib/demo-js.js index be67643..0293308 100644 --- a/lib/demo-js.js +++ b/lib/demo-js.js @@ -61,7 +61,7 @@ import { reactive } from 'vue' const store = reactive({ foo: 'bar', - version: '0.0.2' + version: '0.0.5' }) export default function (app) { diff --git a/package.json b/package.json index 6b19349..e30703f 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,14 @@ { "name": "@bytedo/vue-live-cli", "type": "module", - "version": "0.0.2", + "version": "0.0.3", "bin": { "vue-live-cli": "index.js" }, "dependencies": { "iofs": "^1.5.2" + }, + "engines": { + "node": ">=16.14.0" } }