UNPKG

1 kBJavaScriptView Raw
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 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.Xi18nCommand = void 0;
11const architect_command_1 = require("../models/architect-command");
12class Xi18nCommand extends architect_command_1.ArchitectCommand {
13 constructor() {
14 super(...arguments);
15 this.target = 'extract-i18n';
16 }
17 async run(options) {
18 const version = process.version.substr(1).split('.');
19 if (Number(version[0]) === 12 && Number(version[1]) === 0) {
20 this.logger.error('Due to a defect in Node.js 12.0, the command is not supported on this Node.js version. '
21 + 'Please upgrade to Node.js 12.1 or later.');
22 return 1;
23 }
24 return this.runArchitectTarget(options);
25 }
26}
27exports.Xi18nCommand = Xi18nCommand;