Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-generator into develop
  • Loading branch information
fatihturker committed Dec 14, 2021
2 parents efddd15 + 81068fd commit 4087252
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
27 changes: 19 additions & 8 deletions dependency-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,36 @@ for ( const line of lines ) {
if ( line.length === 0 ) {
continue;
}

if ( lines.indexOf( line ) === 0 ) {
columnIndexes[ 0 ] = line.indexOf( 'Current' );
columnIndexes[ 1 ] = line.indexOf( 'Wanted' ) + 3;
columnIndexes[ 2 ] = line.indexOf( 'Latest' ) + 6;
columnIndexes[ 3 ] = line.indexOf( 'Location' ) + 9;
}

let modifiedLine = line;

let modifiedLine = '';
if ( columnIndexes [ 0 ] >= 0 ) {
for ( const columnIndex of columnIndexes ) {
modifiedLine = modifiedLine.substring( 0, columnIndex ) + ' | ' + modifiedLine.substring( columnIndex, modifiedLine.length );
const stringParts = line.split( /(\s+)/ );

modifiedLine += '| ';

for ( let part of stringParts ) {
if ( part.match( /\s+/ ) ) {
modifiedLine += ' | ';
} else {
modifiedLine += part;
}
}
console.log( '| ' + modifiedLine + ' |' );

modifiedLine += ' |';

console.log( modifiedLine );
} else {
console.log( modifiedLine );
}

if ( lines.indexOf( line ) === 0 ) {
console.log( '| --- | --- | --- | --- | --- |' );
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
},
"devDependencies": {
"@types/inquirer": "^8.1.3",
"@types/node": "^16.11.11",
"@types/node": "^16.11.12",
"@types/shelljs": "^0.8.9",
"@types/yargs": "^17.0.4",
"ts-node": "^10.3.0",
"typescript": "^4.5.2"
"typescript": "^4.5.3"
},
"git repository": "https://github.com/open-template-hub/open-template-hub-server-generator",
"repository": {
Expand Down

0 comments on commit 4087252

Please sign in to comment.