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.

18 lines
624 B

2 weeks ago
  1. const { switchVersion } = require('./utils')
  2. const version = process.argv[2]
  3. const vueEntry = process.argv[3] || 'vue'
  4. if (version === '2.7') {
  5. switchVersion(2.7, vueEntry)
  6. console.log(`[vue-demi] Switched for Vue 2.7 (entry: "${vueEntry}")`)
  7. } else if (version === '2') {
  8. switchVersion(2, vueEntry)
  9. console.log(`[vue-demi] Switched for Vue 2 (entry: "${vueEntry}")`)
  10. } else if (version === '3') {
  11. switchVersion(3, vueEntry)
  12. console.log(`[vue-demi] Switched for Vue 3 (entry: "${vueEntry}")`)
  13. } else {
  14. console.warn(`[vue-demi] expecting version "2" or "2.7" or "3" but got "${version}"`)
  15. process.exit(1)
  16. }