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.

15 lines
386 B

8 years ago
  1. #!/usr/bin/env node
  2. function validNodeVersion () {
  3. var valid = false
  4. try {
  5. const semver = require('semver')
  6. valid = semver.gte(require('process').version, '7.6.0')
  7. } catch (err) {}
  8. return valid
  9. }
  10. if (validNodeVersion()) {
  11. require('../lib/cli-app').run()
  12. } else {
  13. console.log('Sorry, this app requires node v7.6.0 or above. Please upgrade https://nodejs.org/en/')
  14. }