File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 17
17
18
18
This package can be installed globally or locally using:
19
19
``` sh
20
- $ npm install @futura-dev/contribuiting -gen
20
+ $ npm install @futura-dev/contributing -gen
21
21
```
22
22
23
23
Now you can use our CLI issuing:
24
24
``` sh
25
- $ npx @futura-dev/contribuiting -gen generate
25
+ $ npx @futura-dev/contributing -gen generate
26
26
```
27
27
28
28
The CLI asks you to fill the points needed to generate all the files.
Original file line number Diff line number Diff line change @@ -94,8 +94,8 @@ export const generate = async (): Promise<void> => {
94
94
95
95
if ( contributingMd ) writeFile ( `${ process . env . NODE_ENV === 'development' ? 'out' : '' } ` , contributingMd , "CONTRIBUTING.md" ) ;
96
96
if ( codeOfConductMd ) writeFile ( `${ process . env . NODE_ENV === 'development' ? 'out' : '' } ` , codeOfConductMd , "CODE_OF_CONDUCT.md" ) ;
97
- if ( codeOfConductMd ) writeFile ( `${ process . env . NODE_ENV === 'development' ? 'out' : '' } ` , licenseMd , "LICENSE" ) ;
98
- if ( codeOfConductMd ) writeFile ( `${ process . env . NODE_ENV === 'development' ? 'out' : '' } ` , readmeMd , "README.md" ) ;
97
+ if ( licenseMd ) writeFile ( `${ process . env . NODE_ENV === 'development' ? 'out' : '' } ` , licenseMd , "LICENSE" ) ;
98
+ if ( readmeMd ) writeFile ( `${ process . env . NODE_ENV === 'development' ? 'out' : '' } ` , readmeMd , "README.md" ) ;
99
99
100
100
console . log ( 'Contribution files successfully created 🚀' )
101
101
return Promise . resolve ( )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export class ContributingGen {
22
22
* Generate markdown output for the contribution guidelines.
23
23
*/
24
24
generateContributing ( specs : Specs ) {
25
- if ( ! specs . contributing . generate ) return "" ;
25
+ if ( ! specs . contributing . generate ) return null ;
26
26
specs . project . repoUrl = specs . project . repoUrl . replace ( / \/ \s * $ / , "" ) ;
27
27
return this . contributingCompiled ( specs ) ;
28
28
}
@@ -31,23 +31,23 @@ export class ContributingGen {
31
31
* Generate markdown output for the code of conduct.
32
32
*/
33
33
generateCodeOfConduct ( specs : Specs ) {
34
- if ( ! specs . codeOfConduct . generate ) return "" ;
34
+ if ( ! specs . codeOfConduct . generate ) return null ;
35
35
return this . codeOfConductCompiled ( specs ) ;
36
36
}
37
37
38
38
/**
39
39
* Generate markdown output for the license.
40
40
*/
41
41
generateLicense ( specs : Specs ) {
42
- if ( ! specs . license . generate ) return "" ;
42
+ if ( ! specs . license . generate ) return null ;
43
43
return this . licenseCompiled ( specs ) ;
44
44
}
45
45
46
46
/**
47
47
* Generate markdown output for the readme.
48
48
*/
49
49
generateReadme ( specs : Specs ) {
50
- if ( ! specs . readme . generate ) return "" ;
50
+ if ( ! specs . readme . generate ) return null ;
51
51
return this . readmeCompiled ( specs ) ;
52
52
}
53
53
}
You can’t perform that action at this time.
0 commit comments