install-deps.mjs 809 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env node
  2. import sh from 'shelljs'
  3. import * as vars from './vars.mjs'
  4. import log from 'npmlog'
  5. log.info('patch')
  6. sh.exec(`yarn patch-package`, { fatal: true })
  7. log.info('deps', 'app')
  8. sh.cd('app')
  9. sh.exec(`yarn install --force --network-timeout 1000000`, { fatal: true })
  10. sh.cd('..')
  11. sh.cd('web')
  12. sh.exec(`yarn install --force --network-timeout 1000000`, { fatal: true })
  13. sh.exec(`yarn patch-package`, { fatal: true })
  14. sh.cd('..')
  15. vars.allPackages.forEach(plugin => {
  16. log.info('deps', plugin)
  17. sh.cd(plugin)
  18. sh.exec(`yarn install --force --network-timeout 1000000`, { fatal: true })
  19. sh.cd('..')
  20. })
  21. if (['darwin', 'linux'].includes(process.platform)) {
  22. sh.cd('node_modules')
  23. for (let x of vars.builtinPlugins) {
  24. sh.ln('-fs', '../' + x, x)
  25. }
  26. sh.cd('..')
  27. }