You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
401 B

1 month ago
  1. let { execSync } = require('child_process')
  2. let pico = require('picocolors')
  3. try {
  4. let version = parseInt(execSync('npm -v'))
  5. if (version <= 6) {
  6. process.stderr.write(
  7. pico.red(
  8. 'Update npm or call ' +
  9. pico.yellow('npx browserslist@latest --update-db') +
  10. '\n'
  11. )
  12. )
  13. process.exit(1)
  14. }
  15. // eslint-disable-next-line no-unused-vars
  16. } catch (e) {}