caxy / php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML. Includes support for comparing complex lists and tables
http://php-htmldiff.caxy.com
GNU General Public License v2.0
202 stars 51 forks source link

Reduce release size by excluding demos and tests. #86

Closed danepowell closed 3 years ago

danepowell commented 5 years ago

The size of php-htmldiff on disk is 10MB. This may not sound like much, but that could easily make it the single largest package in any given Composer install. This could be easily reduced to <1MB by simply excluding the demos and tests from packaged releases. Anyone who still wants access to those files would still get them by simply cloning from source, but the thousands of other projects simply using this as a library would save a ton of bandwidth and build time. (literally something like 16TB across the 1.6M installs of this project.)

This is an increasingly common pattern for Composer libraries, following the strategy outlined here.

bobvandevijver commented 4 years ago

In my opinion, before this is merged, the demo css should be made available from another path, as it is an easy to use default CSS styling for anyone using the bundle.

Or, even better, maybe it should be offered as SCSS file.

jschroed91 commented 4 years ago

@danepowell You're very right, we should exclude these for sure. Thanks @bobvandevijver for the note, I agree with that. Will get to this later this week.

mrflos commented 3 years ago

Hi @jschroed91 ! Any chance this PR will be merged soon?
We want to use it for an open source project called YesWiki but having a 1mb dependency instead of a 10mb one would be great!

jschroed91 commented 3 years ago

@mrflos Oh, yes let's get this in. I'll take a look after work unless @SavageTiger has any concerns with it, or if he beats me to it

jschroed91 commented 3 years ago

@mrflos This has been merged and included in release v0.1.13 - thank you @danepowell

mrflos commented 3 years ago

Thank you all very very much!