diff --git a/.changeset/cold-news-fry.md b/.changeset/cold-news-fry.md new file mode 100644 index 0000000..01e79aa --- /dev/null +++ b/.changeset/cold-news-fry.md @@ -0,0 +1,5 @@ +--- +"@rhds/icons": patch +--- + +Corrected icon export path from `./dist/{{set}}/*` to `./{{set}}/*` diff --git a/.gitignore b/.gitignore index 53d4eab..91d2abf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,10 @@ dist _site .DS_Store -.wireit \ No newline at end of file +.wireit + +# icon folders +microns +standard +social +ui diff --git a/build.js b/build.js index 0af678c..452ac8a 100644 --- a/build.js +++ b/build.js @@ -17,11 +17,11 @@ const getContent = content => for (const path of await globby('src/**/*.svg')) { const [filename, category] = path.split(sep).reverse(); - await mkdir(new URL(`dist/${category}`, import.meta.url), { recursive: true }); + await mkdir(new URL(`${category}`, import.meta.url), { recursive: true }); const svg = await readFile(new URL(path, import.meta.url), 'utf8'); - await writeFile(new URL(`dist/${category}/${filename}`, import.meta.url), getSVG(svg), 'utf8'); + await writeFile(new URL(`${category}/${filename}`, import.meta.url), getSVG(svg), 'utf8'); await writeFile( - new URL(`dist/${category}/${filename.replace(/\.svg$/, '.js')}`, import.meta.url), + new URL(`${category}/${filename.replace(/\.svg$/, '.js')}`, import.meta.url), getContent(svg), 'utf8' ); diff --git a/package.json b/package.json index 23b429a..4dfc54b 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,10 @@ "test": "echo \"no tests yet\"" }, "files": [ - "./dist/**/*.js", - "./dist/**/*.svg", + "./microns/**/*", + "./standard/**/*", + "./social/**/*", + "./ui/**/*", "!scripts" ], "repository": {