OutPut.js 838 B

12345678910111213141516171819202122232425262728
  1. const Fs = require('fire-fs');
  2. const FsExtra = require('fs-extra');
  3. const Path = require('fire-path');
  4. module.exports = {
  5. get rootDir () {
  6. return Path.join(Editor.Project.path, 'packages-hot-update');
  7. },
  8. get manifestDir () {
  9. return Path.join(this.rootDir, 'manifest');
  10. },
  11. get testServerDir () {
  12. return Path.join(this.rootDir, 'test-server');
  13. },
  14. get reduceDir () {
  15. return Path.join(this.rootDir, 'reduced-res');
  16. },
  17. get versionsDir () {
  18. return Path.join(this.rootDir, 'versions');
  19. },
  20. initialization () {
  21. FsExtra.ensureDirSync(this.rootDir);
  22. FsExtra.ensureDirSync(this.manifestDir);
  23. FsExtra.ensureDirSync(this.testServerDir);
  24. FsExtra.ensureDirSync(this.reduceDir);
  25. FsExtra.ensureDirSync(this.versionsDir);
  26. },
  27. };