install-deps.js 493 B

12345678910111213141516171819202122
  1. #!/usr/bin/env node
  2. const sh = require('shelljs')
  3. const path = require('path')
  4. const vars = require('./vars')
  5. const log = require('npmlog')
  6. const localBinPath = path.resolve(__dirname, '../node_modules/.bin');
  7. const npx = `${localBinPath}/npx`;
  8. log.info('deps', 'app')
  9. sh.exec(`${npx} yarn install`)
  10. sh.cd('app')
  11. sh.exec(`${npx} yarn install`)
  12. sh.cd('..')
  13. vars.builtinPlugins.forEach(plugin => {
  14. log.info('deps', plugin)
  15. sh.cd(plugin)
  16. sh.exec(`${npx} yarn install`)
  17. sh.cd('..')
  18. })