@akanjs/devkit 0.9.55 → 0.9.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/src/executors.js +2 -1
- package/esm/src/executors.js +2 -1
- package/package.json +1 -1
package/cjs/src/executors.js
CHANGED
|
@@ -271,9 +271,10 @@ class Executor {
|
|
|
271
271
|
async cp(srcPath, destPath) {
|
|
272
272
|
const src = this.getPath(srcPath);
|
|
273
273
|
const dest = this.getPath(destPath);
|
|
274
|
+
const isDirectory = import_fs.default.statSync(src).isDirectory();
|
|
274
275
|
if (!import_fs.default.existsSync(src))
|
|
275
276
|
return;
|
|
276
|
-
if (!import_fs.default.existsSync(dest))
|
|
277
|
+
if (!import_fs.default.existsSync(dest) && isDirectory)
|
|
277
278
|
await import_promises.default.mkdir(dest, { recursive: true });
|
|
278
279
|
await import_promises.default.cp(src, dest, { recursive: true });
|
|
279
280
|
}
|
package/esm/src/executors.js
CHANGED
|
@@ -231,9 +231,10 @@ class Executor {
|
|
|
231
231
|
async cp(srcPath, destPath) {
|
|
232
232
|
const src = this.getPath(srcPath);
|
|
233
233
|
const dest = this.getPath(destPath);
|
|
234
|
+
const isDirectory = fs.statSync(src).isDirectory();
|
|
234
235
|
if (!fs.existsSync(src))
|
|
235
236
|
return;
|
|
236
|
-
if (!fs.existsSync(dest))
|
|
237
|
+
if (!fs.existsSync(dest) && isDirectory)
|
|
237
238
|
await fsPromise.mkdir(dest, { recursive: true });
|
|
238
239
|
await fsPromise.cp(src, dest, { recursive: true });
|
|
239
240
|
}
|