mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 10:33:43 +08:00
refactor(@angular/cli): improved code quality
removed unused parameter and improved code quality
This commit is contained in:
parent
af8dd62b74
commit
28721c3e64
1
lib/bootstrap-local.js
vendored
1
lib/bootstrap-local.js
vendored
@ -87,7 +87,6 @@ const packages = require('./packages').packages;
|
||||
if (!__dirname.match(new RegExp(`\\${path.sep}node_modules\\${path.sep}`))) {
|
||||
// We mock the module loader so that we can fake our packages when running locally.
|
||||
const Module = require('module');
|
||||
const oldLoad = Module._load;
|
||||
const oldResolve = Module._resolveFilename;
|
||||
|
||||
Module._resolveFilename = function (request, parent) {
|
||||
|
@ -27,7 +27,7 @@ export class AnalyticsCommandModule extends CommandModule implements CommandModu
|
||||
command = 'analytics';
|
||||
describe =
|
||||
'Configures the gathering of Angular CLI usage metrics. See https://angular.io/cli/usage-analytics-gathering';
|
||||
longDescriptionPath?: string | undefined;
|
||||
longDescriptionPath?: string;
|
||||
|
||||
builder(localYargs: Argv): Argv {
|
||||
const subcommands = [
|
||||
|
@ -20,7 +20,7 @@ export class AnalyticsInfoCommandModule
|
||||
{
|
||||
command = 'info';
|
||||
describe = 'Prints analytics gathering and reporting configuration in the console.';
|
||||
longDescriptionPath?: string | undefined;
|
||||
longDescriptionPath?: string;
|
||||
|
||||
builder(localYargs: Argv): Argv {
|
||||
return localYargs.strict();
|
||||
|
@ -26,7 +26,7 @@ abstract class AnalyticsSettingModule
|
||||
extends CommandModule<AnalyticsCommandArgs>
|
||||
implements CommandModuleImplementation<AnalyticsCommandArgs>
|
||||
{
|
||||
longDescriptionPath?: string | undefined;
|
||||
longDescriptionPath?: string;
|
||||
|
||||
builder(localYargs: Argv): Argv<AnalyticsCommandArgs> {
|
||||
return localYargs
|
||||
|
@ -28,7 +28,7 @@ export class DocCommandModule
|
||||
aliases = ['d'];
|
||||
describe =
|
||||
'Opens the official Angular documentation (angular.io) in a browser, and searches for a given keyword.';
|
||||
longDescriptionPath?: string | undefined;
|
||||
longDescriptionPath?: string;
|
||||
|
||||
builder(localYargs: Argv): Argv<DocCommandArgs> {
|
||||
return localYargs
|
||||
|
@ -17,19 +17,19 @@ export class E2eCommandModule
|
||||
multiTarget = true;
|
||||
override missingErrorTarget = tags.stripIndents`
|
||||
Cannot find "e2e" target for the specified project.
|
||||
|
||||
|
||||
You should add a package that implements end-to-end testing capabilities.
|
||||
|
||||
|
||||
For example:
|
||||
Cypress: ng add @cypress/schematic
|
||||
Nightwatch: ng add @nightwatch/schematics
|
||||
WebdriverIO: ng add @wdio/schematics
|
||||
|
||||
|
||||
More options will be added to the list as they become available.
|
||||
`;
|
||||
|
||||
command = 'e2e [project]';
|
||||
aliases = ['e'];
|
||||
describe = 'Builds and serves an Angular application, then runs end-to-end tests.';
|
||||
longDescriptionPath?: string | undefined;
|
||||
longDescriptionPath?: string;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user