antlink 0.0.1 → 0.0.2

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.
package/README.md CHANGED
@@ -1,4 +1,35 @@
1
1
  ## AntLink
2
- ====================
2
+ ===================================
3
+
4
+ [![NPM version][npm-v-2]][npm-url]
5
+ [![NPM Install Size][size]][size-url]
6
+ [![NPM Downloads][download]][download-url]
7
+ [![NPM License][license]][license-url]
3
8
 
4
- Empty placeholder package.
9
+ ### AntLink Introduction...
10
+ ===================================
11
+
12
+ **Installing AntLink**
13
+
14
+ ```shell
15
+ $ npm install antlink -g
16
+ ```
17
+
18
+ **Initialize service**
19
+
20
+ ```shell
21
+ cd E:\antwork
22
+ ant init
23
+ ```
24
+
25
+
26
+
27
+ [npm-v-1]: https://badgen.net/npm/v/antlink
28
+ [npm-v-2]: https://img.shields.io/npm/v/antlink
29
+ [npm-url]: https://www.npmjs.com/package/antlink
30
+ [size]: https://badgen.net/packagephobia/install/antlink
31
+ [size-url]: https://packagephobia.com/result?p=antlink
32
+ [download]: https://badgen.net/npm/dt/antlink
33
+ [download-url]: https://npmcharts.com/compare/antlink?minimal=true
34
+ [license]:https://badgen.net/npm/license/antlink
35
+ [license-url]:https://npmmirror.com/package/antlink/files/LICENSE
package/bin/ant ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../lib/comm');
package/lib/comm.js ADDED
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+ fkgConmm();
3
+ async function fkgConmm() {
4
+ const arg = process.argv;
5
+ const {version} = require('../package.json');
6
+ if (arg.length < 3) console.log(version);
7
+ if (arg.length > 2) {
8
+ const arr = require('./json/command.json');
9
+ const name = arg[2].toLowerCase(); // 字母转小写
10
+ if (name=='-v') {
11
+ console.log(version);
12
+ } else if(arr.includes(name)){
13
+ await require('./order/'+name)(arg.slice(3));
14
+ }else {
15
+ console.log(`Command '${name}' doesn't exist!`);
16
+ }
17
+ }
18
+ }
@@ -0,0 +1 @@
1
+ ["init","start","stop","kill","reset"]
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ module.exports = async(arg)=>{
3
+ console.log(arg);
4
+ }
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "antlink",
3
- "version": "0.0.1",
4
- "description": "Empty placeholder package.",
3
+ "version": "0.0.2",
4
+ "description": "The framework has just been formed.",
5
5
  "main": "index.js",
6
6
  "author": "weduu",
7
7
  "license": "MIT",
8
- "engines": {
9
- "node": ">=v22.22.1"
10
- }
8
+ "bin": {
9
+ "ant": "bin/ant"
10
+ },
11
+ "files": [
12
+ "lib/",
13
+ "bin/",
14
+ "index.js",
15
+ "README.md"
16
+ ]
11
17
  }