Skip to content

Commit 10641be

Browse files
committed
refactor(@angular-devkit/schematics-cli): remove usage of devkit core tags helper
This helper is only used in one location and can be replicated by adjusting the whitespace of the string within the code. This reduces the number of value imports from `@angular-devkit/core` to only one remaining.
1 parent 15a669c commit 10641be

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

packages/angular_devkit/schematics_cli/bin/schematics.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010
// symbol polyfill must go first
1111
import 'symbol-observable';
12-
import { logging, schema, tags } from '@angular-devkit/core';
12+
import type { logging, schema } from '@angular-devkit/core';
1313
import { ProcessOutput, createConsoleLogger } from '@angular-devkit/core/node';
1414
import { UnsuccessfulWorkflowExecution } from '@angular-devkit/schematics';
1515
import { NodeWorkflow } from '@angular-devkit/schematics/tools';
16-
import * as ansiColors from 'ansi-colors';
17-
import { existsSync } from 'fs';
16+
import ansiColors from 'ansi-colors';
1817
import type { Question, QuestionCollection } from 'inquirer';
19-
import * as path from 'path';
18+
import { existsSync } from 'node:fs';
19+
import * as path from 'node:path';
2020
import yargsParser, { camelCase, decamelize } from 'yargs-parser';
2121

2222
/**
@@ -367,35 +367,35 @@ export async function main({
367367
* Get usage of the CLI tool.
368368
*/
369369
function getUsage(): string {
370-
return tags.stripIndent`
371-
schematics [collection-name:]schematic-name [options, ...]
370+
return `
371+
schematics [collection-name:]schematic-name [options, ...]
372372
373-
By default, if the collection name is not specified, use the internal collection provided
374-
by the Schematics CLI.
373+
By default, if the collection name is not specified, use the internal collection provided
374+
by the Schematics CLI.
375375
376-
Options:
377-
--debug Debug mode. This is true by default if the collection is a relative
378-
path (in that case, turn off with --debug=false).
376+
Options:
377+
--debug Debug mode. This is true by default if the collection is a relative
378+
path (in that case, turn off with --debug=false).
379379
380-
--allow-private Allow private schematics to be run from the command line. Default to
381-
false.
380+
--allow-private Allow private schematics to be run from the command line. Default to
381+
false.
382382
383-
--dry-run Do not output anything, but instead just show what actions would be
384-
performed. Default to true if debug is also true.
383+
--dry-run Do not output anything, but instead just show what actions would be
384+
performed. Default to true if debug is also true.
385385
386-
--force Force overwriting files that would otherwise be an error.
386+
--force Force overwriting files that would otherwise be an error.
387387
388-
--list-schematics List all schematics from the collection, by name. A collection name
389-
should be suffixed by a colon. Example: '@angular-devkit/schematics-cli:'.
388+
--list-schematics List all schematics from the collection, by name. A collection name
389+
should be suffixed by a colon. Example: '@angular-devkit/schematics-cli:'.
390390
391-
--no-interactive Disables interactive input prompts.
391+
--no-interactive Disables interactive input prompts.
392392
393-
--verbose Show more information.
393+
--verbose Show more information.
394394
395-
--help Show this message.
395+
--help Show this message.
396396
397-
Any additional option is passed to the Schematics depending on its schema.
398-
`;
397+
Any additional option is passed to the Schematics depending on its schema.
398+
`;
399399
}
400400

401401
/** Parse the command line. */

0 commit comments

Comments
 (0)