Comments (9)
Without: 119.9kb
With compression: 102kb
Wonderfull! Should absolutely be in there!
from wp-less.
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.
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.
@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.
I create my settings pages mostly in like this:
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.
Yeah it's perfect and straightforward enough :-)
from wp-less.
+1 for compress / minify
from wp-less.
+1 for minify and +1 for define(WP_LESS_COMPRESS, true);
from wp-less.
-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)
- Notice: Undefined index: extension HOT 1
- Add oncletom/wp-less to Packagist HOT 1
- Make package autoloadable HOT 2
- Embedding into a Theme HOT 2
- oyejorge less php library should be updated
- Mixins with multiple arguments HOT 1
- Combine Less Files HOT 2
- Update "oyejorge" LESS compiler
- Use class from css file in another directory HOT 3
- Recompiling Not Working HOT 2
- How to set Upload Dir and set Upload Url correctly? HOT 1
- Debug Mode: Warnings in TinyMCE HOT 1
- composer vendor directory missing from WordPress package HOT 3
- Wp-less parse error: syntax error, unexpected 'const' (T_CONST) HOT 3
- 1.9.3-3 takes my site down. HOT 6
- gargabecollector class php is throwing errors on lines 86 88 91
- Undefined index: port / path / index in lines 312 / 316
- Less_Exception_Compiler
- $lessfile_in_theme error on Windows
- Deprecated: Creation of dynamic property WPLessPlugin::$_TmpBaseDir
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-less.