@akanjs/devkit 0.9.8 → 0.9.10
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 +18 -7
- package/esm/src/executors.js +18 -7
- package/package.json +1 -1
package/cjs/src/executors.js
CHANGED
|
@@ -848,17 +848,28 @@ class AppExecutor extends SysExecutor {
|
|
|
848
848
|
}
|
|
849
849
|
async syncAssets(libDeps) {
|
|
850
850
|
const projectPublicLibPath = `${this.cwdPath}/public/libs`;
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
const projectAssetsLibPath = `${this.cwdPath}/assets/libs`;
|
|
852
|
+
await Promise.all([
|
|
853
|
+
import_fs.default.existsSync(projectPublicLibPath) && import_promises.default.rm(projectPublicLibPath, { recursive: true }),
|
|
854
|
+
import_fs.default.existsSync(projectAssetsLibPath) && import_promises.default.rm(projectAssetsLibPath, { recursive: true })
|
|
855
|
+
]);
|
|
853
856
|
const targetDeps = libDeps.filter((dep) => import_fs.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`));
|
|
854
|
-
await Promise.all(
|
|
855
|
-
|
|
856
|
-
targetDeps.map(
|
|
857
|
-
|
|
857
|
+
await Promise.all([
|
|
858
|
+
...targetDeps.map((dep) => import_promises.default.mkdir(`${projectPublicLibPath}/${dep}`, { recursive: true })),
|
|
859
|
+
...targetDeps.map((dep) => import_promises.default.mkdir(`${projectAssetsLibPath}/${dep}`, { recursive: true }))
|
|
860
|
+
]);
|
|
861
|
+
await Promise.all([
|
|
862
|
+
...targetDeps.map(
|
|
863
|
+
(dep) => import_fs.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`) && import_promises.default.cp(`${this.workspace.workspaceRoot}/libs/${dep}/public`, `${projectPublicLibPath}/${dep}`, {
|
|
864
|
+
recursive: true
|
|
865
|
+
})
|
|
866
|
+
),
|
|
867
|
+
...targetDeps.map(
|
|
868
|
+
(dep) => import_fs.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`) && import_promises.default.cp(`${this.workspace.workspaceRoot}/libs/${dep}/assets`, `${projectAssetsLibPath}/${dep}`, {
|
|
858
869
|
recursive: true
|
|
859
870
|
})
|
|
860
871
|
)
|
|
861
|
-
);
|
|
872
|
+
]);
|
|
862
873
|
}
|
|
863
874
|
}
|
|
864
875
|
class LibExecutor extends SysExecutor {
|
package/esm/src/executors.js
CHANGED
|
@@ -813,17 +813,28 @@ class AppExecutor extends SysExecutor {
|
|
|
813
813
|
}
|
|
814
814
|
async syncAssets(libDeps) {
|
|
815
815
|
const projectPublicLibPath = `${this.cwdPath}/public/libs`;
|
|
816
|
-
|
|
817
|
-
|
|
816
|
+
const projectAssetsLibPath = `${this.cwdPath}/assets/libs`;
|
|
817
|
+
await Promise.all([
|
|
818
|
+
fs.existsSync(projectPublicLibPath) && fsPromise.rm(projectPublicLibPath, { recursive: true }),
|
|
819
|
+
fs.existsSync(projectAssetsLibPath) && fsPromise.rm(projectAssetsLibPath, { recursive: true })
|
|
820
|
+
]);
|
|
818
821
|
const targetDeps = libDeps.filter((dep) => fs.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`));
|
|
819
|
-
await Promise.all(
|
|
820
|
-
|
|
821
|
-
targetDeps.map(
|
|
822
|
-
|
|
822
|
+
await Promise.all([
|
|
823
|
+
...targetDeps.map((dep) => fsPromise.mkdir(`${projectPublicLibPath}/${dep}`, { recursive: true })),
|
|
824
|
+
...targetDeps.map((dep) => fsPromise.mkdir(`${projectAssetsLibPath}/${dep}`, { recursive: true }))
|
|
825
|
+
]);
|
|
826
|
+
await Promise.all([
|
|
827
|
+
...targetDeps.map(
|
|
828
|
+
(dep) => fs.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`) && fsPromise.cp(`${this.workspace.workspaceRoot}/libs/${dep}/public`, `${projectPublicLibPath}/${dep}`, {
|
|
829
|
+
recursive: true
|
|
830
|
+
})
|
|
831
|
+
),
|
|
832
|
+
...targetDeps.map(
|
|
833
|
+
(dep) => fs.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`) && fsPromise.cp(`${this.workspace.workspaceRoot}/libs/${dep}/assets`, `${projectAssetsLibPath}/${dep}`, {
|
|
823
834
|
recursive: true
|
|
824
835
|
})
|
|
825
836
|
)
|
|
826
|
-
);
|
|
837
|
+
]);
|
|
827
838
|
}
|
|
828
839
|
}
|
|
829
840
|
class LibExecutor extends SysExecutor {
|