Add clean script

This commit is contained in:
yogevbd
2019-08-13 15:59:53 +03:00
parent e4455d1926
commit b2c4281fd6
2 changed files with 17 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
"pretest": "./node_modules/.bin/eslint *.js test",
"test": "node scripts/test",
"start": "node ./scripts/start",
"clean": "node ./scripts/clean",
"test-e2e-ios": "node ./scripts/test-e2e --ios",
"test-e2e-ios-release": "node ./scripts/test-e2e --ios --release",
"test-unit-ios": "node ./scripts/test-unit --ios",

16
scripts/clean.js Normal file
View File

@@ -0,0 +1,16 @@
const exec = require('shell-utils').exec;
run();
function run() {
exec.killPort(8081);
exec.execSync(`watchman watch-del-all || true`);
exec.execSync(`adb reverse tcp:8081 tcp:8081 || true`);
exec.execSync(`rm -rf lib/ios/DerivedData`);
exec.execSync(`rm -rf example/ios/DerivedData`);
exec.execSync(`rm -rf lib/android/build`);
exec.execSync(`rm -rf lib/android/app/build`);
exec.execSync(`rm -rf example/android/build`);
exec.execSync(`rm -rf example/android/app/build`);
exec.execSync(`rm -rf lib/dist`);
}