aboutsummaryrefslogtreecommitdiff
path: root/utils.js
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2025-05-23 14:30:44 -0500
committerTim Keller <tjkeller.xyz>2025-05-23 14:30:44 -0500
commit470883b4b836447692ac3ea5d2b4fc50cbdfecba (patch)
treeb9548fb32225b5733a7becbcc0eaa42b2770b88d /utils.js
parente01a5e79337f31e656ed6d87c3cc168a06f0f27a (diff)
downloadmaterial-svg-atlas-plugin-webpack-470883b4b836447692ac3ea5d2b4fc50cbdfecba.tar.xz
material-svg-atlas-plugin-webpack-470883b4b836447692ac3ea5d2b4fc50cbdfecba.zip
create directories for file
Diffstat (limited to 'utils.js')
-rw-r--r--utils.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils.js b/utils.js
index 0e372ae..8284755 100644
--- a/utils.js
+++ b/utils.js
@@ -74,5 +74,8 @@ async function generateAtlasViewsFromReferences(refs, symbolId) {
return generateAtlasViews(result.symbol.sprite.contents.toString(), symbolId)
}
+function createDirectoriesForFile(filePath) {
+ fs.mkdirSync(path.dirname(filePath), { recursive: true })
+}
-module.exports = { generateAtlasViews, generateAtlasViewsFromReferences }
+module.exports = { generateAtlasViews, generateAtlasViewsFromReferences, createDirectoriesForFile }