mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 18:13:38 +08:00
refactor: remove unused methods and locals
This commit is contained in:
parent
d3709e83ba
commit
4941725f9e
@ -383,7 +383,7 @@ export abstract class SchematicsCommandModule
|
||||
}
|
||||
|
||||
private getProjectName(): string | undefined {
|
||||
const { workspace, logger } = this.context;
|
||||
const { workspace } = this.context;
|
||||
if (!workspace) {
|
||||
return undefined;
|
||||
}
|
||||
|
@ -365,16 +365,6 @@ function unwrapTemplateLiteral(
|
||||
return [messageParts, expressions];
|
||||
}
|
||||
|
||||
function unwrapLocalizeCall(
|
||||
path: NodePath<types.CallExpression>,
|
||||
utils: LocalizeUtilityModule,
|
||||
): [TemplateStringsArray, types.Expression[]] {
|
||||
const [messageParts] = utils.unwrapMessagePartsFromLocalizeCall(path);
|
||||
const [expressions] = utils.unwrapSubstitutionsFromLocalizeCall(path);
|
||||
|
||||
return [messageParts, expressions];
|
||||
}
|
||||
|
||||
async function loadLocaleData(path: string, optimize: boolean): Promise<string> {
|
||||
// The path is validated during option processing before the build starts
|
||||
const content = await fs.readFile(path, 'utf8');
|
||||
|
@ -125,7 +125,7 @@ export class AngularWebpackPlugin {
|
||||
}
|
||||
|
||||
apply(compiler: Compiler): void {
|
||||
const { NormalModuleReplacementPlugin, WebpackError, util } = compiler.webpack;
|
||||
const { NormalModuleReplacementPlugin, util } = compiler.webpack;
|
||||
this.webpackCreateHash = util.createHash;
|
||||
|
||||
// Setup file replacements with webpack
|
||||
@ -648,7 +648,11 @@ export class AngularWebpackPlugin {
|
||||
];
|
||||
diagnosticsReporter(diagnostics);
|
||||
|
||||
const transformers = createJitTransformers(builder, this.compilerCli, this.pluginOptions);
|
||||
const transformers = createJitTransformers(
|
||||
builder,
|
||||
this.compilerCliTooling,
|
||||
this.pluginOptions,
|
||||
);
|
||||
|
||||
return {
|
||||
fileEmitter: this.createFileEmitter(builder, transformers, () => []),
|
||||
|
@ -6,9 +6,8 @@
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
|
||||
import * as ts from 'typescript';
|
||||
import ts from 'typescript';
|
||||
|
||||
const TARGET_TEXT = '@NgModule';
|
||||
const BUILTIN_LOADERS = new Set([
|
||||
'provideCloudflareLoader',
|
||||
'provideCloudinaryLoader',
|
||||
|
Loading…
x
Reference in New Issue
Block a user