yuma_rand 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.js +5 -0
  2. package/package.json +4 -1
package/cli.js ADDED
@@ -0,0 +1,5 @@
1
+ //获取命令行参数 rand 1 10
2
+ // console.log(process.argv);
3
+ const rand = require('./index');
4
+
5
+ console.log(rand(Number(process.argv[2]), Number(process.argv[3])));
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "yuma_rand",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
+ "bin": {
5
+ "rand": "./cli.js"
6
+ },
4
7
  "description": "用来生成一个随机数",
5
8
  "license": "ISC",
6
9
  "author": "qiangge",