From efafead6eae0d9c81d40878bacd1a48df17b86c0 Mon Sep 17 00:00:00 2001 From: Julian Skinner Date: Fri, 5 Jan 2024 11:15:47 -0600 Subject: [PATCH] chore: copy svgs to appropriate folders for distribution use --- scripts/collection-copy.ts | 2 ++ stencil.config.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/collection-copy.ts b/scripts/collection-copy.ts index ccff83c..280c459 100644 --- a/scripts/collection-copy.ts +++ b/scripts/collection-copy.ts @@ -5,9 +5,11 @@ export const collectionCopy = async (rootDir: string) => { const optimizedSrc = join(rootDir, 'src', 'svg'); const distSvgDest = join(rootDir, 'dist', 'svg'); const collectionDest = join(rootDir, 'dist', 'collection', 'components', 'pds-icon', 'svg'); + const pdsIconsSvsDest = join(rootDir, 'dist', 'pds-icons', 'svg'); await fs.copy(optimizedSrc, collectionDest); await fs.copy(optimizedSrc, distSvgDest); + await fs.copy(optimizedSrc, pdsIconsSvsDest) // we don't want to copy the src/svgs to the collection (distribution) await fs.remove(join(rootDir, 'dist', 'collection', 'svg')); diff --git a/stencil.config.ts b/stencil.config.ts index d6cbb50..0de7563 100644 --- a/stencil.config.ts +++ b/stencil.config.ts @@ -29,7 +29,8 @@ export const config: Config = { { type: 'www', copy: [ - { src: '../changelogs', dest: 'changelogs'} + { src: '../changelogs', dest: 'changelogs'}, + { src:' ./svg/*.svg', dest: './build/svg/'} ], empty: false, serviceWorker: null, // disable service workers