Skip to content

Commit 261bfe4

Browse files
Merge pull request #403 from NativeScript/vladimirov/add-preuninstall-script
Add preuninstall script
2 parents 41d2cd8 + 3bd05cc commit 261bfe4

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"main": "./lib/nativescript-cli.js",
1212
"scripts": {
1313
"test": "node_modules\\.bin\\_mocha --ui mocha-fibers --recursive --reporter spec --require test/test-bootstrap.js --timeout 15000 test/",
14-
"postinstall": "node postinstall.js"
14+
"postinstall": "node postinstall.js",
15+
"preuninstall": "node preuninstall.js"
1516
},
1617
"repository": {
1718
"type": "git",

preuninstall.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var child_process = require("child_process");
2+
3+
var child = child_process.exec("node bin/nativescript.js dev-preuninstall", function (error) {
4+
if (error) {
5+
console.error("Failed to complete all pre-uninstall steps. ");
6+
console.log(error);
7+
}
8+
});
9+
10+
child.stdout.pipe(process.stdout);

0 commit comments

Comments
 (0)