theme-manager icon indicating copy to clipboard operation
theme-manager copied to clipboard

Serving Assets?

Open mudassir0909 opened this issue 9 years ago • 4 comments

What's the best way to serve assets for your theme? Right now I'm using custom font built using icomoon for theme icons, since the icon font file can't be served, I'm converting the font to base64 format & inlining it.

Can we serve any theme related assets? Perhaps a folder where the theme owners can put theme related assets & it can be served

mudassir0909 avatar Jun 20 '16 06:06 mudassir0909

A public folder sounds good.

Because the themes are pushed to npm, you could also use npmcdn.com in your code to retrieve those files?

thomasdavis avatar Jun 20 '16 06:06 thomasdavis

this is awesome :)

Didn't know about npmcdn.com, we can go for it instead of serving via a public folder

mudassir0909 avatar Jun 20 '16 06:06 mudassir0909

Yeah rad, I imagine we could have a resource lib later that knows how to infer the full npmcdn path by itself when in production because it would always be the same.

npmcdn.com + package.name + /public/ + resource.jpg

thomasdavis avatar Jun 20 '16 06:06 thomasdavis

yes, sounds good, we could have a handlebars helper which points to local folder during development & npmcdn during production

mudassir0909 avatar Jun 20 '16 07:06 mudassir0909