Skip to content

Commit 2b982d2

Browse files
committed
refactor: fix comments to the PR
1 parent 369661b commit 2b982d2

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

packages/@angular/cli/commands/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ export const baseBuildCommandOptions: any = [
181181
{
182182
name: 'experimental-angular-compiler',
183183
type: Boolean,
184-
aliases: ['eac'],
185-
description: 'Use new Angular Compiler (Angular version 5 and greater only).',
184+
// aliases: ['eac'], // We should not have shorthand aliases for experimental flags.
185+
description: '(Experimental) Use new Angular Compiler (Angular version 5 and greater only).',
186186
default: AngularCompilerPlugin.isSupported()
187187
}
188188
];

packages/@ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export interface AngularCompilerPluginOptions {
7171
}
7272

7373
enum PLATFORM {
74-
browser,
75-
server
74+
Browser,
75+
Server
7676
}
7777

7878
export class AngularCompilerPlugin implements Tapable {
@@ -265,7 +265,7 @@ export class AngularCompilerPlugin implements Tapable {
265265
}
266266

267267
// TODO: consider really using platform names in the plugin options.
268-
this._platform = options.replaceExport ? PLATFORM.server : PLATFORM.browser;
268+
this._platform = options.replaceExport ? PLATFORM.Server : PLATFORM.Browser;
269269
}
270270

271271
private _findLazyRoutesInAst(changedFilePaths: string[]): LazyRouteMap {
@@ -539,9 +539,9 @@ export class AngularCompilerPlugin implements Tapable {
539539
changedTsFiles.forEach((fileName) => {
540540
const sourceFile = this._program.getTsProgram().getSourceFile(fileName);
541541
let transformOps;
542-
if (this._platform === PLATFORM.browser) {
542+
if (this._platform === PLATFORM.Browser) {
543543
transformOps = replaceBootstrap(sourceFile, this.entryModule);
544-
} else if (this._platform === PLATFORM.server) {
544+
} else if (this._platform === PLATFORM.Server) {
545545
// export_module_map
546546
transformOps = [
547547
...exportNgFactory(sourceFile, this.entryModule),

packages/@ngtools/webpack/src/loader.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ function _angularImportsFromNode(node: ts.ImportDeclaration, _sourceFile: ts.Sou
7979

8080

8181
function _ctorParameterFromTypeReference(paramNode: ts.ParameterDeclaration,
82-
angularImports: string[],
83-
refactor: TypeScriptFileRefactor) {
82+
angularImports: string[],
83+
refactor: TypeScriptFileRefactor) {
8484
let typeName = 'undefined';
8585

8686
if (paramNode.type) {
@@ -136,8 +136,8 @@ function _ctorParameterFromTypeReference(paramNode: ts.ParameterDeclaration,
136136

137137

138138
function _addCtorParameters(classNode: ts.ClassDeclaration,
139-
angularImports: string[],
140-
refactor: TypeScriptFileRefactor) {
139+
angularImports: string[],
140+
refactor: TypeScriptFileRefactor) {
141141
// For every classes with constructors, output the ctorParameters function which contains a list
142142
// of injectable types.
143143
const ctor = (
@@ -445,7 +445,7 @@ function _diagnoseDeps(reasons: ModuleReason[], plugin: AotPlugin, checked: Set<
445445

446446

447447
export function _getModuleExports(plugin: AotPlugin,
448-
refactor: TypeScriptFileRefactor): ts.Identifier[] {
448+
refactor: TypeScriptFileRefactor): ts.Identifier[] {
449449
const exports = refactor
450450
.findAstNodes(refactor.sourceFile, ts.SyntaxKind.ExportDeclaration, true);
451451

packages/@ngtools/webpack/src/refactor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import * as path from 'path';
33
import * as ts from 'typescript';
44
import {SourceMapConsumer, SourceMapGenerator} from 'source-map';
5-
const MagicString = require('magic-string');
6-
75
import { findAstNodes } from './transformers';
86

7+
const MagicString = require('magic-string');
8+
99

1010
export interface TranspileOutput {
1111
outputText: string;

0 commit comments

Comments
 (0)