Skip to content

Commit

Permalink
fix backslash issue with glob patterns (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sqrrl committed Dec 16, 2022
1 parent 0691993 commit 4405efb
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions addon/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ import { parseSvgFiles } from './parsers/svg-icon.parser';
import { TokenSourceType } from './types/token.types';

function getTokenFilePaths(context: any, designTokenGlob?: string): string[] {
return glob.sync(
path.join(
const pattern = path
.join(
context,
designTokenGlob ||
process.env.DESIGN_TOKEN_GLOB ||
'**/*.{css,scss,less,svg,png,jpeg,gif}'
),
{
ignore: ['**/node_modules/**', '**/storybook-static/**', '**/*.chunk.*']
}
);
)
.replace(/\\/g, '/');

return glob.sync(pattern, {
ignore: ['**/node_modules/**', '**/storybook-static/**', '**/*.chunk.*']
});
}

function addFilesToWebpackDeps(compilation: any, files: string[]) {
Expand Down

0 comments on commit 4405efb

Please sign in to comment.