diff --git a/README.md b/README.md index 6b6233c..450af1f 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ si.cpu() (last 7 major and minor version releases) +- Version 4.21.0: added npx copmpatibility - Version 4.20.0: `battery()` added designcapacity, voltage, unit - Version 4.19.0: `osInfo()` added uefi (OS uses UEFI during startup) - Version 4.18.0: `networkInterfaces()` added dhcp for mac os, added dhcp linux fallback diff --git a/docs/history.html b/docs/history.html index b31a8d3..6b103de 100644 --- a/docs/history.html +++ b/docs/history.html @@ -83,6 +83,11 @@ + + 4.21.0 + 2020-01-27 + added npx compatibility + 4.20.1 2020-01-26 diff --git a/docs/index.html b/docs/index.html index 1889263..61184c3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -168,7 +168,7 @@
systeminformation
-
Current Version: 4.20.1
+
Current Version: 4.21.0
@@ -206,7 +206,7 @@
Downloads last month
-
240
+
242
Dependends
diff --git a/lib/cli.js b/lib/cli.js new file mode 100644 index 0000000..30bdd5b --- /dev/null +++ b/lib/cli.js @@ -0,0 +1,26 @@ +#!/usr/bin/env node + +'use strict'; +// @ts-check +// ================================================================================== +// cli.js +// ---------------------------------------------------------------------------------- +// License: MIT +// ================================================================================== + +// ---------------------------------------------------------------------------------- +// Dependencies +// ---------------------------------------------------------------------------------- +const si = require('./index'); + +// ---------------------------------------------------------------------------------- +// Main +// ---------------------------------------------------------------------------------- +(function() { + si.getStaticData().then( + (data => { + data.time = si.time(); + console.log(JSON.stringify(data, null, 2)); + } + )); +})(); diff --git a/package.json b/package.json index f3f2226..a59fa38 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "author": "Sebastian Hildebrandt (https://plus-innovations.com)", "homepage": "https://github.com/sebhildebrandt/systeminformation", "main": "./lib/index.js", + "bin": "./lib/cli.js", "types": "./lib/index.d.ts", "scripts": { "clean": "rimraf dist",