Skip to content

Commit a65c551

Browse files
committed
chore: try using normalize for path on Windows
1 parent d50c7a7 commit a65c551

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/icons/gulpfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as cheerio from 'cheerio';
22
import { dest, src, task } from 'gulp';
33
import concat from 'gulp-concat';
44
import { gulpPlugin } from 'gulp-plugin-extras';
5+
import { normalize } from 'path';
56

67
function createCopyright() {
78
return `/**
@@ -13,7 +14,7 @@ function createCopyright() {
1314

1415
function transformIcon() {
1516
return gulpPlugin('gulp-transform-icon', (file) => {
16-
const id = file.path.replace(/.*\/(.*).svg/u, '$1');
17+
const id = normalize(file.path).replace(/.*\/(.*).svg/u, '$1');
1718
const svg = cheerio.load(file.contents, { xmlMode: true })('svg');
1819
// Remove fill attributes.
1920
svg.children('[fill]').removeAttr('fill');

0 commit comments

Comments
 (0)