Skip to content

Commit 7ce093f

Browse files
committed
refactor(@angular/build): export DEFAULT_ASSET_IGNORE from resolve-assets
1 parent d968259 commit 7ce093f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎packages/angular/build/src/utils/resolve-assets.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ import path from 'node:path';
1010
import { glob } from 'tinyglobby';
1111
import { isSubDirectory } from './path';
1212

13+
/**
14+
* Default glob ignore patterns for assets.
15+
*/
16+
export const DEFAULT_ASSET_IGNORE = ['.gitkeep', '**/.DS_Store', '**/Thumbs.db'] as const;
17+
1318
export async function resolveAssets(
1419
entries: {
1520
glob: string;
@@ -21,8 +26,6 @@ export async function resolveAssets(
2126
}[],
2227
root: string,
2328
): Promise<{ source: string; destination: string }[]> {
24-
const defaultIgnore = ['.gitkeep', '**/.DS_Store', '**/Thumbs.db'];
25-
2629
const outputFiles: { source: string; destination: string }[] = [];
2730

2831
for (const entry of entries) {
@@ -35,7 +38,7 @@ export async function resolveAssets(
3538
const files = await glob(entry.glob, {
3639
cwd,
3740
dot: true,
38-
ignore: entry.ignore ? defaultIgnore.concat(entry.ignore) : defaultIgnore,
41+
ignore: entry.ignore ? [...DEFAULT_ASSET_IGNORE, ...entry.ignore] : DEFAULT_ASSET_IGNORE,
3942
followSymbolicLinks: entry.followSymlinks,
4043
});
4144

0 commit comments

Comments
 (0)