Skip to content

Commit

Permalink
Replace fs writeFile with outputFile
Browse files Browse the repository at this point in the history
  • Loading branch information
vladshcherbin committed Aug 19, 2020
1 parent f86beda commit 5922b20
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ export default function svgSprite(options = {}) {
const symbols = [...loadedSvgs.values()].map((id) => convertedSvgs.get(id))
const { data } = await svgo.optimize(createSprite(symbols))

await fs.ensureDir(outputFolder)
await fs.writeFile(`${outputFolder}/sprites.svg`, data)
await fs.outputFile(`${outputFolder}/sprites.svg`, data)

loadedSvgs.clear()
}
Expand Down

0 comments on commit 5922b20

Please sign in to comment.