easter-egg-impl.js 1.0 KB

123456789101112131415161718192021222324252627282930
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. /**
  4. * @license
  5. * Copyright Google Inc. All Rights Reserved.
  6. *
  7. * Use of this source code is governed by an MIT-style license that can be
  8. * found in the LICENSE file at https://angular.io/license
  9. */
  10. const command_1 = require("../models/command");
  11. const color_1 = require("../utilities/color");
  12. function pickOne(of) {
  13. return of[Math.floor(Math.random() * of.length)];
  14. }
  15. class AwesomeCommand extends command_1.Command {
  16. async run() {
  17. const phrase = pickOne([
  18. `You're on it, there's nothing for me to do!`,
  19. `Let's take a look... nope, it's all good!`,
  20. `You're doing fine.`,
  21. `You're already doing great.`,
  22. `Nothing to do; already awesome. Exiting.`,
  23. `Error 418: As Awesome As Can Get.`,
  24. `I spy with my little eye a great developer!`,
  25. `Noop... already awesome.`,
  26. ]);
  27. this.logger.info(color_1.colors.green(phrase));
  28. }
  29. }
  30. exports.AwesomeCommand = AwesomeCommand;