sync-package-json.ts 462 B

12345678910111213141516171819202122
  1. import { commandCheck, commandHelp, commandList, commandSet, commandUpdate } from './lib'
  2. const params: string[] = process.argv.slice(3)
  3. switch (process.argv[2]) {
  4. case 'check':
  5. commandCheck(params[0])
  6. break
  7. case 'list':
  8. commandList(params[0])
  9. break
  10. case 'set':
  11. commandSet(params[0], params[1])
  12. break
  13. case 'update':
  14. commandUpdate(params[0], params.slice(1))
  15. break
  16. case 'help':
  17. default:
  18. commandHelp()
  19. break
  20. }