Skip to content

Commit 3936e70

Browse files
committed
not remove dir in custome flow
1 parent f6af2a2 commit 3936e70

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/utils/fileSystem.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import {
22
copyFile as __copyFile,
3-
mkdirp as __mkdirp,
43
pathExists as __pathExists,
54
readFile as __readFile,
65
remove as __remove,
76
writeFile as __writeFile,
7+
ensureDir,
88
} from 'fs-extra';
99

1010
// Export calls (needed for mocking)
1111
export const readFile = __readFile;
1212
export const writeFile = __writeFile;
1313
export const copyFile = __copyFile;
1414
export const exists = __pathExists;
15-
export const mkdir = __mkdirp;
15+
export const mkdir = ensureDir;
1616
export const rmdir = async (path: string) => {
1717
return Promise.resolve();
1818
};

src/utils/writeCustomTemplate/clientServices.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { mkdir, readFile, remove } from 'fs-extra';
1+
import { readFile, remove } from 'fs-extra';
22
import Handlebars from 'handlebars';
33
import { resolve } from 'path';
44

55
import { Client } from '../../client/interfaces/Client';
66
import { HttpClient } from '../../HttpClient';
77
import { Indent } from '../../Indent';
8-
import { writeFile } from '../fileSystem';
8+
import { mkdir, writeFile } from '../fileSystem';
99
import { formatCode } from '../formatCode';
1010
import { formatIndentation } from '../formatIndentation';
1111
import { isDefined } from '../isDefined';
@@ -39,7 +39,7 @@ export const writeClientServicesCustomTemplate = async (
3939
const serviceTemplate = Handlebars.compile(await readFile(templatePath, 'utf8'));
4040

4141
const servicesDir = resolve(outputPath, 'store');
42-
await remove(servicesDir);
42+
// await remove(servicesDir);
4343
await mkdir(servicesDir);
4444

4545
for (const service of client.services) {

0 commit comments

Comments
 (0)