Publish NPM package which only contains CSS #1278
-
We are implementing UNDP design component in sveltekit in the below repo. https://github.com/UNDP-Data/geohub/tree/develop/packages/svelte-undp-design There is a https://www.npmjs.com/package/@undp/design-system?activeTab=code Could you kindly consider publishing new package which only contain CSS? So, we can import UNDP design CSS to implement svelte component. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
@JinIgarashi , if you need just to include css in your project you can do it via jsdelivr CDN: https://cdn.jsdelivr.net/npm/@undp/design-system/ . Use instructions for specific components at https://design.undp.org/ to identify specific files to include. If you need to work with SCSS files importing them and amending - you will have to keep this package as a dependency and import respective assets into yours |
Beta Was this translation helpful? Give feedback.
-
As I mentioned, this repository's NPM package size is too big because it contains all source code. You should use |
Beta Was this translation helpful? Give feedback.
-
On the contrary, anybody can use repository as a dependency as it doesn't need to be included in your package, you can import what you need only, disregarding everything else. We have several projects, starting with starter's template, which are successfully using design system package as dependency. It is really up to you how to manage imports/inclusions in your package |
Beta Was this translation helpful? Give feedback.
-
well, the NPM package can be used if you want to download 64MB everytime... |
Beta Was this translation helpful? Give feedback.
-
@JinIgarashi , if you are still interested - we've just published a separate NPM package @undp/design-system-assets, containing only compiled assets (css/js/fonts/images). |
Beta Was this translation helpful? Give feedback.
@JinIgarashi , if you need just to include css in your project you can do it via jsdelivr CDN: https://cdn.jsdelivr.net/npm/@undp/design-system/ . Use instructions for specific components at https://design.undp.org/ to identify specific files to include.
If you need to work with SCSS files importing them and amending - you will have to keep this package as a dependency and import respective assets into yours