Skip to content

Commit

Permalink
[Windows:Build] Enhances the cleanup of node
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki committed Oct 19, 2022
1 parent b02f51a commit 7338547
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/dev/build/tasks/nodejs/clean_node_builds_task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* under the License.
*/

import { deleteAll, Task } from '../../lib';
import { deleteAll, normalizePath, Task } from '../../lib';

export const CleanNodeBuilds: Task = {
description: 'Cleaning npm from node',
Expand All @@ -37,9 +37,11 @@ export const CleanNodeBuilds: Task = {
for (const platform of config.getTargetPlatforms()) {
await deleteAll(
[
build.resolvePathForPlatform(platform, 'node/lib/node_modules'),
build.resolvePathForPlatform(platform, 'node/bin/npm'),
build.resolvePathForPlatform(platform, 'node/bin/npx'),
normalizePath(build.resolvePathForPlatform(platform, 'node/**/node_modules')),
normalizePath(build.resolvePathForPlatform(platform, 'node/**/npm*')),
normalizePath(build.resolvePathForPlatform(platform, 'node/**/npx*')),
normalizePath(build.resolvePathForPlatform(platform, 'node/**/corepack*')),
normalizePath(build.resolvePathForPlatform(platform, 'node/**/nodevars*')),
],
log
);
Expand Down

0 comments on commit 7338547

Please sign in to comment.