lessphp
lessphp copied to clipboard
Implement caching for on-demand compiling with plessc
Implemented caching feature (that exists in main module) to plessc command-line tool.
Added -q key to plessc in order to enable this new feature.
The code if based on this example from lessphp documentation:
http://leafo.net/lessphp/docs/#compiling_automatically
Generates .lessphp files beside corresponded less-files compiled, and then tries to read them and use as cache.
Rewrites cache files when needed ($cache_new["updated"] > $cache["updated"]).
This thing about caching is what we are using intensively in a project with lot of LESS styles compiled with lessphp.
Please accept this request, or explain problems/issues it can cause (though I can't imagine any - because it is a new feature, changing nothing in existing functional :)
I suppose this feature could be useful for everyone who uses lessphp.
Please merge this pull request, I think this feature will be useful for everyone using plessc CLI tool. Also, it shouldn't break anything currently working.
Would you please (review and) merge that?
Why don't accept this cool pull request?