xi18n-impl.js 972 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. /**
  3. * @license
  4. * Copyright Google Inc. All Rights Reserved.
  5. *
  6. * Use of this source code is governed by an MIT-style license that can be
  7. * found in the LICENSE file at https://angular.io/license
  8. */
  9. Object.defineProperty(exports, "__esModule", { value: true });
  10. const architect_command_1 = require("../models/architect-command");
  11. class Xi18nCommand extends architect_command_1.ArchitectCommand {
  12. constructor() {
  13. super(...arguments);
  14. this.target = 'extract-i18n';
  15. }
  16. async run(options) {
  17. const version = process.version.substr(1).split('.');
  18. if (Number(version[0]) === 12 && Number(version[1]) === 0) {
  19. this.logger.error('Due to a defect in Node.js 12.0, the command is not supported on this Node.js version. '
  20. + 'Please upgrade to Node.js 12.1 or later.');
  21. return 1;
  22. }
  23. return this.runArchitectTarget(options);
  24. }
  25. }
  26. exports.Xi18nCommand = Xi18nCommand;