1 | /// <amd-module name="@angular/compiler-cli/ngcc/src/writing/cleaning/package_cleaner" />
|
---|
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, ReadonlyFileSystem } from '../../../../src/ngtsc/file_system';
|
---|
10 | import { EntryPoint } from '../../packages/entry_point';
|
---|
11 | import { CleaningStrategy } from './cleaning_strategies';
|
---|
12 | /**
|
---|
13 | * A class that can clean ngcc artifacts from a directory.
|
---|
14 | */
|
---|
15 | export declare class PackageCleaner {
|
---|
16 | private fs;
|
---|
17 | private cleaners;
|
---|
18 | constructor(fs: ReadonlyFileSystem, cleaners: CleaningStrategy[]);
|
---|
19 | /**
|
---|
20 | * Recurse through the file-system cleaning files and directories as determined by the configured
|
---|
21 | * cleaning-strategies.
|
---|
22 | *
|
---|
23 | * @param directory the current directory to clean
|
---|
24 | */
|
---|
25 | clean(directory: AbsoluteFsPath): void;
|
---|
26 | }
|
---|
27 | /**
|
---|
28 | * Iterate through the given `entryPoints` identifying the package for each that has at least one
|
---|
29 | * outdated processed format, then cleaning those packages.
|
---|
30 | *
|
---|
31 | * Note that we have to clean entire packages because there is no clear file-system boundary
|
---|
32 | * between entry-points within a package. So if one entry-point is outdated we have to clean
|
---|
33 | * everything within that package.
|
---|
34 | *
|
---|
35 | * @param fileSystem the current file-system
|
---|
36 | * @param entryPoints the entry-points that have been collected for this run of ngcc
|
---|
37 | * @returns true if packages needed to be cleaned.
|
---|
38 | */
|
---|
39 | export declare function cleanOutdatedPackages(fileSystem: FileSystem, entryPoints: EntryPoint[]): boolean;
|
---|