1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { NormalizedOptimizationOptions } from '../normalize-optimization';
|
---|
9 | import { CrossOriginValue, FileInfo } from './augment-index-html';
|
---|
10 | export interface IndexHtmlGeneratorProcessOptions {
|
---|
11 | lang: string | undefined;
|
---|
12 | baseHref: string | undefined;
|
---|
13 | outputPath: string;
|
---|
14 | files: FileInfo[];
|
---|
15 | noModuleFiles: FileInfo[];
|
---|
16 | moduleFiles: FileInfo[];
|
---|
17 | }
|
---|
18 | export interface IndexHtmlGeneratorOptions {
|
---|
19 | indexPath: string;
|
---|
20 | deployUrl?: string;
|
---|
21 | sri?: boolean;
|
---|
22 | entrypoints: string[];
|
---|
23 | postTransform?: IndexHtmlTransform;
|
---|
24 | crossOrigin?: CrossOriginValue;
|
---|
25 | optimization?: NormalizedOptimizationOptions;
|
---|
26 | WOFFSupportNeeded: boolean;
|
---|
27 | }
|
---|
28 | export declare type IndexHtmlTransform = (content: string) => Promise<string>;
|
---|
29 | export interface IndexHtmlTransformResult {
|
---|
30 | content: string;
|
---|
31 | warnings: string[];
|
---|
32 | errors: string[];
|
---|
33 | }
|
---|
34 | export declare class IndexHtmlGenerator {
|
---|
35 | readonly options: IndexHtmlGeneratorOptions;
|
---|
36 | private readonly plugins;
|
---|
37 | constructor(options: IndexHtmlGeneratorOptions);
|
---|
38 | process(options: IndexHtmlGeneratorProcessOptions): Promise<IndexHtmlTransformResult>;
|
---|
39 | readAsset(path: string): Promise<string>;
|
---|
40 | protected readIndex(path: string): Promise<string>;
|
---|
41 | }
|
---|