Skip to content

Commit b72de77

Browse files
committed
fix(gulp-purgecss): support skippedContentGlobs option #853
1 parent c822058 commit b72de77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/gulp-purgecss/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export { UserDefinedOptions };
1111

1212
const PLUGIN_NAME = "gulp-purgecss";
1313

14-
function getFiles(contentArray: string[]): string[] {
14+
function getFiles(contentArray: string[], ignore?: string[]): string[] {
1515
return contentArray.reduce((acc: string[], content) => {
16-
return [...acc, ...glob.sync(content)];
16+
return [...acc, ...glob.sync(content, { ignore })];
1717
}, []);
1818
}
1919

@@ -33,7 +33,7 @@ function gulpPurgeCSS(options: UserDefinedOptions): internal.Transform {
3333
try {
3434
const optionsGulp = {
3535
...options,
36-
content: getFiles(options.content),
36+
content: getFiles(options.content, options.skippedContentGlobs),
3737
css: [
3838
{
3939
raw: file.contents.toString(),

0 commit comments

Comments
 (0)