aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/generate-impl.js
diff options
context:
space:
mode:
authorNevena Bojovic <nenabojov@gmail.com>2022-03-01 22:05:25 +0100
committerNevena Bojovic <nenabojov@gmail.com>2022-03-01 22:05:25 +0100
commit6555fb80fdd8f6a5d201efadec3189d1244830a0 (patch)
treec1aa1c5aedc634ad1ea7fad4847884d559b51290 /sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/generate-impl.js
parent7d3640f824f46490b47bd95f1c5a16644f712068 (diff)
Izbrisala bin, obj i node-modules.
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/generate-impl.js')
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/generate-impl.js89
1 files changed, 0 insertions, 89 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/generate-impl.js b/sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/generate-impl.js
deleted file mode 100644
index 9179df19..00000000
--- a/sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/generate-impl.js
+++ /dev/null
@@ -1,89 +0,0 @@
-"use strict";
-/**
- * @license
- * Copyright Google LLC All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.GenerateCommand = void 0;
-const schematic_command_1 = require("../models/schematic-command");
-const color_1 = require("../utilities/color");
-const json_schema_1 = require("../utilities/json-schema");
-class GenerateCommand extends schematic_command_1.SchematicCommand {
- async initialize(options) {
- // Fill up the schematics property of the command description.
- const [collectionName, schematicName] = await this.parseSchematicInfo(options);
- this.collectionName = collectionName;
- this.schematicName = schematicName;
- await super.initialize(options);
- const collection = this.getCollection(collectionName);
- const subcommands = {};
- const schematicNames = schematicName ? [schematicName] : collection.listSchematicNames();
- // Sort as a courtesy for the user.
- schematicNames.sort();
- for (const name of schematicNames) {
- const schematic = this.getSchematic(collection, name, true);
- this.longSchematicName = schematic.description.name;
- let subcommand;
- if (schematic.description.schemaJson) {
- subcommand = await (0, json_schema_1.parseJsonSchemaToSubCommandDescription)(name, schematic.description.path, this._workflow.registry, schematic.description.schemaJson);
- }
- else {
- continue;
- }
- if ((await this.getDefaultSchematicCollection()) == collectionName) {
- subcommands[name] = subcommand;
- }
- else {
- subcommands[`${collectionName}:${name}`] = subcommand;
- }
- }
- this.description.options.forEach((option) => {
- if (option.name == 'schematic') {
- option.subcommands = subcommands;
- }
- });
- }
- async run(options) {
- if (!this.schematicName || !this.collectionName) {
- return this.printHelp();
- }
- return this.runSchematic({
- collectionName: this.collectionName,
- schematicName: this.schematicName,
- schematicOptions: options['--'] || [],
- debug: !!options.debug || false,
- dryRun: !!options.dryRun || false,
- force: !!options.force || false,
- });
- }
- async reportAnalytics(paths, options) {
- if (!this.collectionName || !this.schematicName) {
- return;
- }
- const escapedSchematicName = (this.longSchematicName || this.schematicName).replace(/\//g, '_');
- return super.reportAnalytics(['generate', this.collectionName.replace(/\//g, '_'), escapedSchematicName], options);
- }
- async parseSchematicInfo(options) {
- let collectionName = await this.getDefaultSchematicCollection();
- let schematicName = options.schematic;
- if (schematicName && schematicName.includes(':')) {
- [collectionName, schematicName] = schematicName.split(':', 2);
- }
- return [collectionName, schematicName];
- }
- async printHelp() {
- await super.printHelp();
- this.logger.info('');
- // Find the generate subcommand.
- const subcommand = this.description.options.filter((x) => x.subcommands)[0];
- if (Object.keys((subcommand && subcommand.subcommands) || {}).length == 1) {
- this.logger.info(`\nTo see help for a schematic run:`);
- this.logger.info(color_1.colors.cyan(` ng generate <schematic> --help`));
- }
- return 0;
- }
-}
-exports.GenerateCommand = GenerateCommand;