Skip to content

Commit e5f333c

Browse files
authored
Merge pull request #71 from open-template-hub/develop
Release/update docs
2 parents 32787b6 + b941878 commit e5f333c

File tree

5 files changed

+96
-11
lines changed

5 files changed

+96
-11
lines changed

NPM-README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,15 @@ No sponsors yet! **Will you be the first?**
6767

6868
## Contributing
6969

70-
* Fork it
71-
* Create your update branch (git checkout -b my-feature-branch)
72-
* Commit your changes (git commit -am 'Add some features')
73-
* Push to the branch (git push origin my-feature-branch)
74-
* Create new Pull Request
70+
Refer to **[CONTRIBUTING.md](https://github.com/open-template-hub/.github/blob/master/docs/CONTRIBUTING.md)** to see how to contribute to Open Template Hub.
71+
72+
<br/>
73+
74+
## Code of Conduct
75+
76+
Refer to **[CODE_OF_CONDUCT.md](https://github.com/open-template-hub/.github/blob/master/docs/CODE_OF_CONDUCT.md)** to see contributor covenant code of conduct.
77+
78+
<br/>
7579

7680
## LICENSE
7781

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,15 @@ No sponsors yet! **Will you be the first?**
7373

7474
## Contributing
7575

76-
* Fork it
77-
* Create your update branch (git checkout -b my-feature-branch)
78-
* Commit your changes (git commit -am 'Add some features')
79-
* Push to the branch (git push origin my-feature-branch)
80-
* Create new Pull Request
76+
Refer to **[CONTRIBUTING.md](https://github.com/open-template-hub/.github/blob/master/docs/CONTRIBUTING.md)** to see how to contribute to Open Template Hub.
77+
78+
<br/>
79+
80+
## Code of Conduct
81+
82+
Refer to **[CODE_OF_CONDUCT.md](https://github.com/open-template-hub/.github/blob/master/docs/CODE_OF_CONDUCT.md)** to see contributor covenant code of conduct.
83+
84+
<br/>
8185

8286
## LICENSE
8387

dependency-checker.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
const { spawnSync } = require( 'child_process' );
2+
const outdatedCmd = spawnSync( 'npm', [ 'outdated' ] );
3+
4+
const lines = outdatedCmd.stdout.toString().split( '\n' );
5+
6+
const columnIndexes = [ 0, 0, 0, 0 ];
7+
8+
console.log(
9+
'<p align="center">\n' +
10+
' <a href="https://opentemplatehub.com">\n' +
11+
' <img src="https://raw.githubusercontent.com/open-template-hub/open-template-hub.github.io/master/assets/logo/generator/server-generator-logo.png" alt="Logo" width=200>\n' +
12+
' </a>\n' +
13+
'</p>\n' +
14+
'\n' +
15+
'\n' +
16+
'<h1 align="center">\n' +
17+
'Open Template Hub - Server Generator v2\n' +
18+
' <br/>\n' +
19+
'(outdated packages)\n' +
20+
'</h1>\n' +
21+
'\n' +
22+
'Following packages are not updated in the develop branch yet. So, if you want to update outdated packages on your own risk, update the package.json and install dependencies.\n'
23+
);
24+
25+
for ( const line of lines ) {
26+
if ( line.length === 0 ) {
27+
continue;
28+
}
29+
30+
if ( lines.indexOf( line ) === 0 ) {
31+
columnIndexes[ 0 ] = line.indexOf( 'Current' );
32+
columnIndexes[ 1 ] = line.indexOf( 'Wanted' ) + 3;
33+
columnIndexes[ 2 ] = line.indexOf( 'Latest' ) + 6;
34+
columnIndexes[ 3 ] = line.indexOf( 'Location' ) + 9;
35+
}
36+
37+
let modifiedLine = line;
38+
39+
if ( columnIndexes [ 0 ] >= 0 ) {
40+
for ( const columnIndex of columnIndexes ) {
41+
modifiedLine = modifiedLine.substring( 0, columnIndex ) + ' | ' + modifiedLine.substring( columnIndex, modifiedLine.length );
42+
}
43+
console.log( '| ' + modifiedLine + ' |' );
44+
} else {
45+
console.log( modifiedLine );
46+
}
47+
48+
if ( lines.indexOf( line ) === 0 ) {
49+
console.log( '| --- | --- | --- | --- | --- |' );
50+
}
51+
}
52+
53+
console.log(
54+
'\n' +
55+
'<table align="right"><tr><td><a href="https://opentemplatehub.com"><img src="https://raw.githubusercontent.com/open-template-hub/open-template-hub.github.io/master/assets/logo/brand-logo.png" width="50px" alt="oth"/></a></td><td><b>Open Template Hub © 2021</b></td></tr></table>\n'
56+
);

docs/OUTDATED.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<p align="center">
2+
<a href="https://opentemplatehub.com">
3+
<img src="https://raw.githubusercontent.com/open-template-hub/open-template-hub.github.io/master/assets/logo/generator/server-generator-logo.png" alt="Logo" width=200>
4+
</a>
5+
</p>
6+
7+
8+
<h1 align="center">
9+
Open Template Hub - Server Generator v2
10+
<br/>
11+
(outdated packages)
12+
</h1>
13+
14+
Following packages are not updated in the develop branch yet. So, if you want to update outdated packages on your own risk, update the package.json and install dependencies.
15+
16+
| Package | Current | Wanted | Latest | Location |
17+
| --- | --- | --- | --- | --- |
18+
19+
<table align="right"><tr><td><a href="https://opentemplatehub.com"><img src="https://raw.githubusercontent.com/open-template-hub/open-template-hub.github.io/master/assets/logo/brand-logo.png" width="50px" alt="oth"/></a></td><td><b>Open Template Hub © 2021</b></td></tr></table>
20+

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"main": "dist/index.js",
88
"scripts": {
99
"start": "ts-node src/index.ts",
10-
"build": "tsc"
10+
"build": "tsc",
11+
"outdated": "node dependency-checker.ts > docs/OUTDATED.md"
1112
},
1213
"bin": {
1314
"open-template-hub-server-generator": "dist/index.js"

0 commit comments

Comments
 (0)