Skip to content

Commit

Permalink
Merge pull request #37 from iegik/patch-3
Browse files Browse the repository at this point in the history
Update build.js
  • Loading branch information
leungwensen committed Aug 2, 2017
2 parents 95cc5db + bdd3286 commit 8183df2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = (options) => {
shelljs.mkdir('-p', targetSvgPath);

lang.forIn(iconMap, (partPathname, key) => {
const svgPathname = /^\./.test(partPathname) ? path.join(process.cwd(), `${partPathname}.svg`) : path.join(__dirname, `../dist/trimmed-svg/${partPathname}.svg`);
const svgPathname = /^\./.test(partPathname) ? path.join(process.cwd(), path.dirname(options.source), `${partPathname}.svg`) : path.join(__dirname, `../dist/trimmed-svg/${partPathname}.svg`);
shelljs.cp(svgPathname, targetSvgPath);
const svgContent = fs.readFileSync(svgPathname, 'utf8');
const id = `${options.name}-${key}`;
Expand Down

0 comments on commit 8183df2

Please sign in to comment.