1 | /// <amd-module name="@angular/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies" />
|
---|
2 | /**
|
---|
3 | * @license
|
---|
4 | * Copyright Google LLC All Rights Reserved.
|
---|
5 | *
|
---|
6 | * Use of this source code is governed by an MIT-style license that can be
|
---|
7 | * found in the LICENSE file at https://angular.io/license
|
---|
8 | */
|
---|
9 | import { AbsoluteFsPath, FileSystem, PathSegment } from '../../../../src/ngtsc/file_system';
|
---|
10 | /**
|
---|
11 | * Implement this interface to extend the cleaning strategies of the `PackageCleaner`.
|
---|
12 | */
|
---|
13 | export interface CleaningStrategy {
|
---|
14 | canClean(path: AbsoluteFsPath, basename: PathSegment): boolean;
|
---|
15 | clean(path: AbsoluteFsPath, basename: PathSegment): void;
|
---|
16 | }
|
---|
17 | /**
|
---|
18 | * A CleaningStrategy that reverts changes to package.json files by removing the build marker and
|
---|
19 | * other properties.
|
---|
20 | */
|
---|
21 | export declare class PackageJsonCleaner implements CleaningStrategy {
|
---|
22 | private fs;
|
---|
23 | constructor(fs: FileSystem);
|
---|
24 | canClean(_path: AbsoluteFsPath, basename: PathSegment): boolean;
|
---|
25 | clean(path: AbsoluteFsPath, _basename: PathSegment): void;
|
---|
26 | }
|
---|
27 | /**
|
---|
28 | * A CleaningStrategy that removes the extra directory containing generated entry-point formats.
|
---|
29 | */
|
---|
30 | export declare class NgccDirectoryCleaner implements CleaningStrategy {
|
---|
31 | private fs;
|
---|
32 | constructor(fs: FileSystem);
|
---|
33 | canClean(path: AbsoluteFsPath, basename: PathSegment): boolean;
|
---|
34 | clean(path: AbsoluteFsPath, _basename: PathSegment): void;
|
---|
35 | }
|
---|
36 | /**
|
---|
37 | * A CleaningStrategy that reverts files that were overwritten and removes the backup files that
|
---|
38 | * ngcc created.
|
---|
39 | */
|
---|
40 | export declare class BackupFileCleaner implements CleaningStrategy {
|
---|
41 | private fs;
|
---|
42 | constructor(fs: FileSystem);
|
---|
43 | canClean(path: AbsoluteFsPath, basename: PathSegment): boolean;
|
---|
44 | clean(path: AbsoluteFsPath, _basename: PathSegment): void;
|
---|
45 | }
|
---|