Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 50c3ab9

Browse files
Mitko-Kerezovsis0k0
authored andcommitted
fix: clean snapshot artifacts on cleanApp hook (#423)
This fixes NativeScript/nativescript-cli#3335
1 parent 0bb673a commit 50c3ab9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Diff for: lib/before-cleanApp.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const ProjectSnapshotGenerator = require("../snapshot/android/project-snapshot-generator");
2+
module.exports = function ($mobileHelper, hookArgs) {
3+
if ($mobileHelper.isAndroidPlatform(hookArgs.platformInfo.platform)) {
4+
ProjectSnapshotGenerator.cleanSnapshotArtefacts(hookArgs.platformInfo.projectData.projectDir);
5+
}
6+
}

Diff for: package.json

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
"script": "lib/before-prepareJS.js",
1616
"inject": true
1717
},
18+
{
19+
"type": "before-cleanApp",
20+
"script": "lib/before-cleanApp.js",
21+
"inject": true
22+
},
1823
{
1924
"type": "after-prepare",
2025
"script": "lib/after-prepare.js",

0 commit comments

Comments
 (0)