hsh19900502 1.0.1 → 1.0.3
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/bin/hsh.mjs +21 -0
- package/package.json +4 -3
- package/src/commands/commit.mjs +6 -0
- package/src/utils.mjs +3 -0
- package/bin/hsh +0 -2
package/bin/hsh.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env zx
|
|
2
|
+
import { require } from '../src/utils.mjs';
|
|
3
|
+
import { gcm } from '../src/commands/commit.mjs';
|
|
4
|
+
|
|
5
|
+
const { Command } = require('commander');
|
|
6
|
+
|
|
7
|
+
const program = new Command();
|
|
8
|
+
|
|
9
|
+
program.usage('<command> [options]')
|
|
10
|
+
program.version(require('../package').version)
|
|
11
|
+
|
|
12
|
+
program.command('gcm')
|
|
13
|
+
.description('commit changes')
|
|
14
|
+
// .option('-m, --message <message>', 'commit message')
|
|
15
|
+
.argument('<words...>')
|
|
16
|
+
.action((words) => {
|
|
17
|
+
console.log(words)
|
|
18
|
+
gcm(words.join(' '))
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
program.parse();
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hsh19900502",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
|
-
"hsh": "bin/hsh"
|
|
10
|
+
"hsh": "bin/hsh.mjs"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [],
|
|
13
13
|
"author": "",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"commander": "^12.0.0",
|
|
18
18
|
"inquirer": "^9.2.15",
|
|
19
19
|
"log-symbols": "^6.0.0",
|
|
20
|
-
"ora": "^8.0.1"
|
|
20
|
+
"ora": "^8.0.1",
|
|
21
|
+
"zx": "^7.2.3"
|
|
21
22
|
}
|
|
22
23
|
}
|
package/src/utils.mjs
ADDED
package/bin/hsh
DELETED