rmrevin / yii2-minify-view

Yii2 View component with minification css & js
MIT License
191 stars 67 forks source link

Compress Inline code #42

Closed kr0lik closed 6 years ago

kr0lik commented 8 years ago

Is it possible to add inline scripts compression and packaging them in a file?

guzuomuse commented 8 years ago

+1

guzuomuse commented 8 years ago

i think it's neccesary to compress inline js or css include @import style; like the html-compressor

rmrevin commented 8 years ago

@kr0lik @guzuomuse If we try to shove inline js \ css in a compressed file, it may result in a violation of the order of boot scripts \ styles, which in turn will entail the occurrence of errors. I can imagine how it is possible to compress inline data. But how to combine them with compressed files, can not imagine.

If you have any ideas, send pull reqest with the tests.

kr0lik commented 8 years ago

No. Usually, in yii all the scripts are inserted after script files. It is possible to make a variable in config like js_length and js_inline_compress. And if js_inline_compress = true, we look length if inline-scripts and if it more or equal js_length, we create a file to paste the code, compress and instead of code displays a link to the file. How do I get time, I will try to send pull reqest.

rmrevin commented 8 years ago

@kr0lik okay, i wait.

rmrevin commented 6 years ago

Closed for lack of response.