vanilla-framework icon indicating copy to clipboard operation
vanilla-framework copied to clipboard

Compiled CSS and JS

Open Dameen-Rainer opened this issue 2 years ago • 5 comments

Is there a plan to add ready-to-use compiled CSS and JS filles to be directly include in local development projects as a third option?

I think not everyone prefer to use yarn or npm to have those things set up.

Dameen-Rainer avatar Oct 03 '23 18:10 Dameen-Rainer

You can hotlink directly to Vanilla CSS from our servers (as per https://vanillaframework.io/docs#hotlink):

<link rel="stylesheet" href="https://assets.ubuntu.com/v1/vanilla-framework-version-4.3.0.min.css" />

Currently we don't export JS in any way unfortunately, so you would need to copy JS code examples from our docs into local files.

bartaz avatar Oct 03 '23 18:10 bartaz

I use hotlink in production but it development I just copy the minified CSS to work with it locally it'll be easier that way.

Hope to see those available in future.

Dameen-Rainer avatar Oct 04 '23 06:10 Dameen-Rainer

Not sure why you can't use hotlinked CSS in development if you use it in production?

How would you want it to work? If you don't want to use yarn/npm to install/build the package, where do you want to get CSS from for local development?

bartaz avatar Oct 04 '23 06:10 bartaz

I just copy the hotlinked CSS url to a browser as a Web address then the browser will show the minified CSS in plain text & then I copy it to a css file named after the version pointed in hotlink. The Web address will be something like: 'https://assets.ubuntu.com/v1/vanilla-framework-version-4.3.0.min.css'

You know direct hotlink requires Internet connection, so using it during development will be too costly here in Senegal.

Dameen-Rainer avatar Oct 04 '23 07:10 Dameen-Rainer

OK, thanks for the context, I didn't realise you meant offline use.

We can provide an option to download the same prebuilt CSS, so it would be a bit easier than coping the contents of the CSS opened in the browser, but the end result will be exactly the same.

bartaz avatar Oct 04 '23 07:10 bartaz