install-deps.mjs 957 B

1234567891011121314151617181920212223242526272829303132333435
  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. // Some native packages might fail to build before patch-package gets a chance to run via postinstall
  11. sh.exec(`yarn postinstall`, { fatal: false })
  12. sh.cd('..')
  13. sh.cd('web')
  14. sh.exec(`yarn install --force --network-timeout 1000000`, { fatal: true })
  15. sh.exec(`yarn patch-package`, { fatal: true })
  16. sh.cd('..')
  17. vars.allPackages.forEach(plugin => {
  18. log.info('deps', plugin)
  19. sh.cd(plugin)
  20. sh.exec(`yarn install --force --network-timeout 1000000`, { fatal: true })
  21. sh.cd('..')
  22. })
  23. if (['darwin', 'linux'].includes(process.platform)) {
  24. sh.cd('node_modules')
  25. for (let x of vars.builtinPlugins) {
  26. sh.ln('-fs', '../' + x, x)
  27. }
  28. sh.cd('..')
  29. }