October: Framework and Framework Extra files aren't minimized

Created on 14 Mar 2017  路  13Comments  路  Source: octobercms/october

Expected behavior

/modules/system/assets/css/framework.extras.css
/modules/system/assets/js/framework.js
/modules/system/assets/js/framework/extras.js

Should be minified/uglified to help with loading speeds.

I can do this myself of course however there's a chance it would be overwritten with a build update.

Actual behavior

Above files aren't minifified/uglified

Reproduce steps

Install latest build.

October build

396

High Completed Enhancement

Most helpful comment

It would depend how you loaded it. If you used the asset combiner:

<script src="{{ ['@framework', '@framework.extras'] | theme }}"></script>

and then set your asset minification config settings, then yes, it should minify it for you. If you're referencing it directly then it won't.

All 13 comments

Isn't there a minified parameter in the config files?

It would depend how you loaded it. If you used the asset combiner:

<script src="{{ ['@framework', '@framework.extras'] | theme }}"></script>

and then set your asset minification config settings, then yes, it should minify it for you. If you're referencing it directly then it won't.

Thanks @LukeTowers, @SebastiaanKloos I was using what I thought was the standard way:
{% framework extras %}

Using this and setting 'enableAssetMinify' => true in config/cms.php combines and minifies!

Closing ticket.

Oops, now the AJAX framework is broken for me. Reverting back to {% framework extras %} resolves it.

We could potentially minify it using october:util compile assets and toggle between the two based on cms.enableAssetMinify for the framework extras tag. That sounds like a great idea.

+1 @daftspunk

Thanks for keeping this issue open. Have you had any thoughts on how to progress with this?

+1 would be nice!

+1

The support demand for October is increasing, while the available time the founders have to give remains the same. These issues will be handled in time, however there are ways you can help:

@lrs @SebastiaanKloos @maartenmachiels @You85 Support has been added in the latest develop branch thanks to @jimcottrell!

Any docs for this feature ?

@BahodurSaidov it's enabled automatically when cms.enableAssetMinify is enabled: https://github.com/octobercms/october/blob/master/config/cms.php#L186-L198

Was this page helpful?
0 / 5 - 0 ratings