File tree 3 files changed +80
-0
lines changed
3 files changed +80
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+ const execa = require ( 'execa' ) ;
3
+ const meow = require ( 'meow' ) ;
4
+ const prompter = require ( '@commitlint/prompt' ) . prompter ;
5
+
6
+ const HELP = `
7
+ Usage
8
+ $ commit
9
+ ` ;
10
+
11
+ const _ = undefined ;
12
+ const prompt = ( ) => prompter ( _ , commit ) ;
13
+
14
+ main ( meow ( HELP ) )
15
+ . catch ( err => {
16
+ setTimeout ( ( ) => {
17
+ throw err ;
18
+ } ) ;
19
+ } ) ;
20
+
21
+ function main ( ) {
22
+ return prompt ( ) ;
23
+ }
24
+
25
+ function commit ( message ) {
26
+ const c = execa ( 'git' , [ 'commit' , '-m' , message ] ) ;
27
+ c . stdout . pipe ( process . stdout ) ;
28
+ c . stderr . pipe ( process . stderr ) ;
29
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " @commitlint/prompt" ,
3
+ "version" : " 3.0.0" ,
4
+ "description" : " commit prompt using .commitlintrc" ,
5
+ "bin" : {
6
+ "commit" : " ./cli.js"
7
+ },
8
+ "scripts" : {
9
+ "clean" : " rimraf lib" ,
10
+ "commit" : " $npm_package_bin_commit" ,
11
+ "pretest" : " dep-check"
12
+ },
13
+ "xo" : false ,
14
+ "repository" : {
15
+ "type" : " git" ,
16
+ "url" : " git+https://github.com/marionebl/commitlint.git"
17
+ },
18
+ "keywords" : [
19
+ " commitlint" ,
20
+ " prompt"
21
+ ],
22
+ "author" : " Mario Nebl <hello@herebecode.com>" ,
23
+ "license" : " MIT" ,
24
+ "bugs" : {
25
+ "url" : " https://github.com/marionebl/commitlint/issues"
26
+ },
27
+ "homepage" : " https://github.com/marionebl/commitlint#readme" ,
28
+ "devDependencies" : {
29
+ "@commitlint/utils" : " ^3.0.0"
30
+ },
31
+ "dependencies" : {
32
+ "@commitlint/prompt" : " ^3.0.0" ,
33
+ "execa" : " ^0.7.0" ,
34
+ "meow" : " ^3.7.0"
35
+ }
36
+ }
Original file line number Diff line number Diff line change
1
+ > commit prompt using .commitlintrc
2
+
3
+ # @commitlint/prompt-cli
4
+
5
+ ## Getting started
6
+
7
+ ``` bash
8
+ npm install --g @commitlint/prompt-cli @commitlint/config-angular
9
+ echo ' {"extends": ["@commitlint/config-angular"]}' > .commitlintrc
10
+ ```
11
+
12
+ ``` bash
13
+ git add .
14
+ commit
15
+ ```
You can’t perform that action at this time.
0 commit comments