Skip to content

Commit

Permalink
feat(react): add createGlobPatternsForDependencies utility useful in …
Browse files Browse the repository at this point in the history
…tailwind CSS purging
  • Loading branch information
juristr authored and FrozenPandaz committed Jun 25, 2021
1 parent bcdf5a7 commit 0175dfc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/react/tailwind.ts
@@ -0,0 +1,13 @@
import { createGlobPatternsForDependencies as workspaceGenerateGlobs } from '@nrwl/workspace/src/utilities/generate-globs';

/**
* generates a set of glob patterns based off the source root of the app and it's dependencies
* @param dirPath workspace relative directory path that will be used to infer the parent project and dependencies
* @param fileGlobPattern pass a custom glob pattern to be used
*/
export function createGlobPatternsForDependencies(
dirPath: string,
fileGlobPattern: string = '/**/!(*.stories|*.spec).{tsx,jsx,js}'
) {
return workspaceGenerateGlobs(dirPath, fileGlobPattern);
}

0 comments on commit 0175dfc

Please sign in to comment.