Skip to content

Commit 7c54ac1

Browse files
authored
Add script to remove Overview title and badges (#1935)
This PR related to #1786. Signed-off-by: Denis Golovin dgolovin@redhat.com
1 parent 90969da commit 7c54ac1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

build/update-readme.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*-----------------------------------------------------------------------------------------------
2+
* Copyright (c) Red Hat, Inc. All rights reserved.
3+
* Licensed under the MIT License. See LICENSE file in the project root for license information.
4+
*-----------------------------------------------------------------------------------------------*/
5+
6+
import { readFileSync, writeFileSync } from 'fs-extra';
7+
8+
const readme = readFileSync('./README.md');
9+
10+
const lines = `${readme}`.split('\n');
11+
12+
const index = lines.findIndex((line) => line.includes('## Overview'));
13+
lines.splice(0, index + 1);
14+
writeFileSync('./README.md', lines.join('\n'));

0 commit comments

Comments
 (0)