modx-minify's People
modx-minify's Issues
On/off setting
On/off setting to switch modxMinify on or off for development. When modxMinify is switched to off, just include the files...
Add a 'filter by group' combobox in files grid
can not add a resource with the content type "css"
I can not add a resource with the content type "css" to the group
I get the error - One or more of your files cannot be found in the specified path(s).
It would be cool if you can combine a physical file and a dynamic resource
Adding second snippet call produces 500 system error
Fix: The minify class should be required once at line number 6 and line number 19.
Assetic Twig conflict
I'm using Commerce and Modxminify and the two conflict because both are loading different versions of Twig through composer, causing 500 errors because Commerce loads the Modx Minify version of Twig. In MODX Minify it is loaded through the Assetic composer file.
Could you remove Twig from the Assetic composer file? I've tested without and everything still seems to work fine and it fixed my issue.
When clearing cache also clear cache for multiple-group calls
when using [[modxMinify?&group=
css1,css2]]
, and clearing the MODX manager cache, the generated cache file for these joined groups doesn't get deleted.
Some SCSS Errors with Leafo's ScssPhp can be fixed
This thread saved my life when I had trouble compiling a standard Foundation SCSS:
leafo/scssphp#446
This post (leafo/scssphp#446 (comment)) held the key for the solution, but it is not update save.
Maybe you guys want to patch ModxMinfy a little or maybe not... 'sup to you.
Just in case someone gets strange errors from ModxMinify this here might help, so I wrote these lines. ;-)
When extra js file(s) are added to the config, the js file is not added to the minified javascript.
Probably should check te config file for changes. If a file is added to the config, the script should re-run and add the file to the compiled javascript.
@import Issue
I am creating a separate issue, although it may relate to #34
Issue
When importing a .scss file into another, it works correctly, however importing a .css file with import does not work.
Currently I have @import "variables.scss";
which is working correctly.
Doing anything with a regular css file, i.e. @import "reset.css";
or @import "reset";
refuses to compile and errors out.
All of the StackOverflow posts I have found regarding this issue say that @import "reset";
should work, and does in current versions.
A simple fix would be for me to rename reset.css
to reset.scss
however in MODX we use this reset.css
file in conjunction with TinyMCE RTE to style the richtext editor to look like the live page. TinyMCE RTE cannot accept a .scss file because it is not compiled before specified, and you cannot specify the path to the compiled .css file because it changes based on the modified date and version.
To fix this, we could go two routes:
Solution 1
Allow us to manipulate the compiled file name to something we specify in the system settings, which then gets appended with a ?v=*modified-date*
therefore the path is always the same. This would allow us to specify the end file for TinyMCE RTE to read off of.
Solution 2
Update the php compiler to work with modern .scss and .less. This is obviously ideal but a much larger job (I would imagine).
Unfortunately I know nothing close to what I would need to, to help with this. If anyone has some direction on an alternate solution, or some hack that you have found, I would love to know.
I am on MODX Slack if you want to message me directly with any questions: @sargasm
Thanks
cssrewrite filter doesn't correctly rewrite relative (../) paths
If you include a css file with relative file path includes ( For example a font: src:url('../yourwebfont.eot');
) the source path isn't correctly rewritten to the full absolute path.
Create table prefix issue
When installing modx-minify it will use modx_ as db prefix which break if a custom table prefix is used. Can be fixed by using db_prefix from config.
Feature Request: Be able to specify location of output
For example it would be nice not to have the minified file shown as being in /assets/components/modxminify/...
Add support for chunks and/or settings (Client Config colors for sass variables)
Would be great to have support for chunks and/or settings.
I my case Client Config colors so I can choose sass variables.
Can't Create or Save Anything
Just installed this and it doesn't work.
It installed ok but when I try to add a group it won;t do anything.
I hit save and nothing happens.
Is there some secret setting that I need to enable to make this work or is it just broken?
Please advise.
Thanks
Add a 'Rebuild minified files' button in CMP to rebuild minified files for all groups
Issues with TinyMCE RTE
I import my stylesheet into the settings of TinyMCE RTE extra to style the content via css. Unfortunately, the way the files are generated through MODX Minify, I cannot set a specific path to my style.scss file to be included as the name of the file changes on each save.
I have seen other minify extras do it differently where the style.css file gets appended with a ?v1.x (style.css?v1.x) rather than an entire name change.
Is this something that is possible via a setting in MODX Minify?
Thanks!
Groups select has a limit of 20
I'm having more than 20 groups and when I want to add a new file, the group selector only displays 20 groups.
I think the results are set to a limit of 20 groups.
No scrollbar if a lot of files
Consider adding the feature to minify HTML output
Consider adding a feature to minify the generated HTML output of a resource.
https://developers.google.com/speed/docs/insights/MinifyResources
Feature request: Add options for scss source map and formatting
I'm using this mostly to compile my scss. It would be nice if there were options to create a source map and to choose formatting type. Ideally, these would be set in the snippet call.
Add option for inlining critical css
Add a parameter to the modxMinify snippet which can be used to inline critical css.
See https://github.com/kalfheim/critical-css for a php implementation of critical css with php.
No cross-domain/multi-context support
Since MODX Revolution supports multiple sites to be managed from one install, I feel like any add-on, such as this, should support that as well. And unless I missed something somewhere, it doesn't, though.
I have one install at let's domain1.com, but also manage domain2.com and domain3.com from the same install. The minified result will always be placed in the domain.com/assets/.. folder, thus forcing one to use a cross-domain link.
Shouldn't it be possible to have the created file be placed on the other domains as well?
Update lessphp filter to latest version (0.5.0)
When compiling Bootstrap 3.3 less files, Lessphp filter throws an error: leafo/lessphp#520
Generate minified filename based on md5 hash
At the moment the minified filename is generated based on the latest file modification time of the files from the group. But when using imports inside a css file, the modification times of those files are not checked so the minified file is sometimes not updated correctly. Using the md5 hash from the minified file should solve this.
CMP doesn't work
This is how my network response looks on a server where modx-minify works (MODX 2.6.1):
The dev tools show all the files requested after loading the minify manager page. I can add groups and files without any problem.
This is how it look on another modx setup (2.6.0).
No files are loaded, I can't add groups or files.
Both installations are on the same server. I've reinstalled modx-minifyx two times (no effect).
At the moment I can'*t update the system to 2.6.1, so I can't check if the modx Version is the root of the problem.
I don't see any error on my server or any js errors on the console.
Any idea, whats going on?
Update:
I've reset all file and folder permissions (644/755) in
core/components/modx-minify
and assets/components/modx-minify
Afterwards the CMP loaded the necessary files, but I still couldn't add groups or files to the CMP.
Feature Request: Manager Driven Regen
I would request that the regeneration process is initiated through an action in the manager, e.g. during a clear cache. As it stands, it seems to really slow down a site at the worst moment.
Don't work
MODX 2.7.1-pl
I'm trying to add a new group, but after clicking nothing happens.
Netwrok response:
{"success":false,"message":"","total":1,"data":[{"id":"name","msg":"Key is not specified."}],"object":[]}
The text supporting icons is unnecessary
The icons which represent 'edit' and 'delete' come with a support text which says 'edit group', 'remove group' etc. These support texts aren't really necessary since the icons are very understandable on their own. Leaving these texts out wil be great for the overall impression of the interface as it'll be a lot more orderly.
@import issue
Hi! First of all, thank you for great addon for MODx.
In my css code often used @import, from local or external url, but then styles minimized import dont work.
Support ModX Output filters and settings
Might be very good if is possible add [[++settings]] to be processed into the JS or CSS
and use conditionals too: [[++setting:is=Yes
:then=a { height:100%; }
]]
Issue using calc()
I am having an issue where the minification of my stylesheet is removing the spacing in any/all calc() functions.
In the inspector, not having a space in your calc function breaks it.
Another thing to note is it only happens when the operator in the calc() function is a +
.
I have temporarily fixed my calc functions by changing:
font-size: calc(2.5rem + 1.5vw);
to font-size: calc(2.5rem - -1.5vw);
Anyone have a solve for this?
Feature Request: Developer mode
It would be great to add ability to print number of lines not-bundled and not-minified files for best readability in dev console for best DX (dev exp).
May be just add parameter for snippet call, or (and) system setting...
I'm receiving a 404 on the stylesheet modxMinify creates...
I'm receiving a 404 on the stylesheet modxMinify creates, it looks like it's not creating the cache folder or the CSS file in the assets/components/modxminify/ directory. Any idea why that would be?
Feature Request : Better Error Handling
So currently if someone misses a colon or something, the site goes offline. Only way to remedy is to find the php error log and track it down, or look over code by hand, it's usually something recently changed, but harder to find on large merges.
Proposed changes:
- Build SCSS button on manager side, it reports errors to console / modx error log
- If error is found don't write final css file / somehow fail to a safe working state.
Error with scss files
[2016-02-17 15:53:33] ERROR @ /home/atom/domains/atom.heibelschoppen.nl/public_html/core/components/modxminify/model/modxminify/modxminify.class.php : 278 PHP warning: Invalid argument supplied for foreach()
2016-02-17 15:53:38] ERROR @ /home/atom/domains/atom.heibelschoppen.nl/public_html/core/components/modxminify/model/modxminify/modxminify.class.php : 149 PHP warning: Invalid argument supplied for foreach()
any errors should be send to Modx error log
Add menu item for clearing minify cache
Also remove the ModxMinifyCacheClear plugin
Please update scssPHP
I had constant trouble with Bootstrap4 (and also Foundation6) and the standard scss-files (see also #35). I failed to compile the plain bs/scss/bootstrap.scss
and bs/scss/bootstrap-grid.scss
. How can that be?
Getting the BS4.3.1 release from GitHub did not work, but getting the sources from the BS4 website itself ("Download source") was a success โ but only AFTER I updated scssPHP.
This is what Composer told me:
CLI:/core/components/modxminify/assetic/vendor$ php ./temp/composer.phar outdated
No composer.json in current directory, do you want to use the one at //core/components/modxminify/assetic? [Y,n]? Y
leafo/scssphp v0.7.5 v0.8.4 scssphp is a compiler for SCSS written in PHP.
mrclay/minify 2.3.3 3.0.3 Minify is a PHP5 app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip enc...
psr/log 1.0.2 1.1.0 Common interface for logging libraries
symfony/process v3.4.9 v4.3.2 Symfony Process Component
leafo/scssphp v0.7.5 >> v0.8.4 !!!
AFTER I did the scssPHP update, I could continue with my life.
I did not update the other components because I was to afraid breaking anything and spending even more time on this trivial task.
Could you please check the MODX Minify package to be capeable of getting the job done with the current BS4 and FD6?
Thanks!
Minify process is too zealous - breaks Bootstrap form styling
Some CSS rules require spaces. For example Bootstrap has the following applied to its input elements: height: calc(2.25rem + 2px). The + requires a space on either side or it doesn't work. Unfortunately the spaces get stripped out leaving the input oddly sized. I've worked around this on my current project by adding inline css to the form but it'd be great to get this fixed properly.
this is not a bug, but a recommendation
Sorry for my english. A great component, but it would be nice to add the ability to disable a certain file from the group. Do not delete, but disable)
Intro msg is replaced with menu desc
The intromessage is currently missing. It's replaced with the menu description which provides only limited information. The intromessage should be added in it's place.
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.