Giter Club home page Giter Club logo

Comments (9)

dhunink avatar dhunink commented on July 30, 2024

Without: 119.9kb
With compression: 102kb

Wonderfull! Should absolutely be in there!

from wp-less.

thom4parisot avatar thom4parisot commented on July 30, 2024

Yep that's definitely the kind of things which should be available.

There are various approaches:

  • a configuration constant define(WP_LESS_COMPRESS, true);
  • via WPLessPlugin proxy methods (like it's done with import dirs etc.)
  • via WPLessConfiguration attribute

I even think the formatter should be the most readable one if WP_DEBUG is on.

from wp-less.

dhunink avatar dhunink commented on July 30, 2024

I personally reel like a even better option would be to let a user set is an option through the admin interface. Could store it as a option value in the default DB or write it in the wp-config file on save.

from wp-less.

thom4parisot avatar thom4parisot commented on July 30, 2024

@dhunink agreed; it's just not the fastest way to provide this feature at the moment. If you want to take over on the admin panel I won't say no ;-)

from wp-less.

dhunink avatar dhunink commented on July 30, 2024

I create my settings pages mostly in like this:
schermafbeelding 2013-08-29 om 13 43 35

How would you feel for something similar to that for the plugin? It isn't so hard to code actually. And we could wrap up more settings in there if desired.

from wp-less.

thom4parisot avatar thom4parisot commented on July 30, 2024

Yeah it's perfect and straightforward enough :-)

from wp-less.

Bicarbona avatar Bicarbona commented on July 30, 2024

+1 for compress / minify

from wp-less.

juanstiza avatar juanstiza commented on July 30, 2024

+1 for minify and +1 for define(WP_LESS_COMPRESS, true);

from wp-less.

vweevers avatar vweevers commented on July 30, 2024

-1 for WP_LESS_COMPRESS configuration madness, and -1 for option pages with a maintenance burden. As a consumer, simply do:

$less = WPLessPlugin::getInstance();
$less->getCompiler()->setFormatter('compressed');

But I do agree it should be the default formatter. Proposal for Plugin.class.php:

if (!defined('WP_DEBUG') || !WP_DEBUG) {
  $this->compiler->setFormatter('compressed');
}

IMHO, this plugin should do less (pun intended) and delegate more to the compiler.

from wp-less.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.