react-native-navigation的迁移库

clean.js 1000B

123456789101112131415161718192021222324252627282930
  1. const exec = require('shell-utils').exec;
  2. const isWindows = process.platform === 'win32' ? true : false;
  3. if (isWindows) runWin32();
  4. else run();
  5. function run() {
  6. exec.killPort(8081);
  7. exec.execSync(`watchman watch-del-all || true`);
  8. exec.execSync(`adb reverse tcp:8081 tcp:8081 || true`);
  9. exec.execSync(`rm -rf lib/ios/DerivedData`);
  10. exec.execSync(`rm -rf playground/ios/DerivedData`);
  11. exec.execSync(`rm -rf lib/android/build`);
  12. exec.execSync(`rm -rf lib/android/app/build`);
  13. exec.execSync(`rm -rf playground/android/build`);
  14. exec.execSync(`rm -rf playground/android/app/build`);
  15. exec.execSync(`rm -rf lib/dist`);
  16. }
  17. function runWin32() {
  18. exec.execSync(`adb reverse tcp:8081 tcp:8081 || true`);
  19. exec.execSync('del /F /S /Q lib\\android\\build');
  20. exec.execSync('del /F /S /Q lib\\android\\app\\build');
  21. exec.execSync('del /F /S /Q playground\\android\\build');
  22. exec.execSync('del /F /S /Q playground\\android\\app\\build');
  23. exec.execSync('del /F /S /Q lib\\dist');
  24. }