tsedio / tsed-formio

Repository dedicated to formiojs.
https://formio.tsed.io
14 stars 8 forks source link

[QUESTION] CDN to replace bootstrap in form.io example? #99

Closed bilogic closed 1 year ago

bilogic commented 1 year ago

Hi,

There is a simple example located here https://formio.github.io/formio.js/

It uses the CSS https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css Is there tailwind equivalent CDN link to replace the bootstrap CSS?

Thank you.

Romakita commented 1 year ago

No cdn are available. This project is designed to be used with webpack/vite stack.

I haven’t time to improve lib to support cdn but PR is welcome! See you

bilogic commented 1 year ago

@Romakita

Thanks for the prompt reply.

With your clear answer, what I did was go over to https://formio.tsed.io/iframe.html?viewMode=story&id=formiojs-formbuilder--sandbox&args= and extracted the CSS, hacky but seems to work!

I haven’t time to improve lib to support cdn but PR is welcome!

Maybe a compiled dist would be sufficient for now. I hope my little hack helps someone. :)

github-actions[bot] commented 1 year ago

🎉 Are you happy?

If you appreciated the support, know that it is free and is carried out on personal time ;)

A support, even a little bit makes a difference for me and continues to bring you answers!

github opencollective

Romakita commented 1 year ago

@bilogic the compiled css by storybook can change at any time. The build isnt versionned and the will be broken if I release a new version. The correct way is to integrate a build step to push the css on a cdn :)

bilogic commented 1 year ago

Yes, I do understand, I'm still assessing the suitability of form.io, and I'm not familiar with form.io nor webpack, let alone integrating them together. Anyway, thank you for pointing out.

Romakita commented 1 year ago

Ok quick step is to copy the generated css file by storybook and push it on cdn :)

Romakita commented 1 year ago

The build step is here : https://github.com/tsedio/tsed-formio/blob/0d754e8b5e1ff40b5dc71b0dfb5f3b4608b111b2/.github/workflows/build.yml#L102

bilogic commented 1 year ago

Sounds simple enough, let me get to it. Thank you.