1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.updateReadme = void 0;
|
4 | const path_1 = require("path");
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | function updateReadme(tree, schema) {
|
11 | const readmePath = (0, path_1.join)(schema.relativeToRootDestination, 'README.md');
|
12 | if (!tree.exists(readmePath)) {
|
13 |
|
14 | return;
|
15 | }
|
16 | const findName = new RegExp(`${schema.projectName}`, 'g');
|
17 | const oldContent = tree.read(readmePath, 'utf-8');
|
18 | const newContent = oldContent.replace(findName, schema.newProjectName);
|
19 | tree.write(readmePath, newContent);
|
20 | }
|
21 | exports.updateReadme = updateReadme;
|
22 |
|
\ | No newline at end of file |