Munee: Standalone PHP 5.3 Asset Optimisation & Manipulation

Overview

Munee: Standalone PHP 5.3 Asset Optimisation & Manipulation

#####On-The-Fly Image Resizing, On-the-fly LESS, SCSS, CoffeeScript Compiling, CSS & JavaScript Combining/Minifying, and Smart Client Side and Server Side Caching

Gitter Build Status Flatter this


Official Website

Documentation

API

Comments
  • CSS background path problem '../'

    CSS background path problem '../'

    Hello the original css code is background-image: url('../img/logo.png'); and after Munee the css code chenge to background-image: url(/themes/default/img/logo.png); "WRONG PATH AND IMAGES NOT WORKING".

    in the same CSS if the background path is 'images/demo.jpg' after Munee the code path remain the same and working.

    The fixRelativeImagePaths have some issues.

    bug 
    opened by nikmauro 32
  • Feature Request: adaptive image output (as dispatcher option maybe?)

    Feature Request: adaptive image output (as dispatcher option maybe?)

    Hi Cody,

    Great work! Munee has become a standard asset in my projects very quickly.

    Previously I experimented with http://adaptive-images.com/ to serve appropriately sized images to devices. I'm trying to find a way to replicate this with munee.

    In short: I'd like to be able to set munee to an exact width (max device screen width) and have it resize all image output to that size. Would a dispacher option work for that?

    enhancement 
    opened by jvdh 20
  • @import and minification

    @import and minification

    I have tried munee now, but I still seem to miss something.

    Folder structure:

    Base is a subdir under the doc root: <DOCUMENTROOT>/sub1/sub2

    CSS files are placed in a subdir: <DOCUMENTROOT>/sub1/sub2/templates/freshcat/css/default

    Munee is located in a different sub folder: <DOCUMENTROOT>/sub1/sub2/lib_munee/munee.php

    The only file loaded is index.css, which contains a bunch of @imports.

    @import url(reset.css);
    @import url(webfont.css);
    @import url(colors.css);
    ...
    

    Result is a minified index.css, but the files that are imported are not minified. Is this by design, or do I have to tweak my config?

    define('MUNEE_FOLDER','<DOCUMENTROOT>/sub1/sub2/lib_munee'));
    define('MUNEE_CACHE' ,'<DOCUMENTROOT>/sub1/sub2/temp/cache'));
    define('DS'          ,DIRECTORY_SEPARATOR);
    define('WEBROOT'     ,'<DOCUMENTROOT>/sub1/sub2');
    define('SUB_FOLDER'  ,'sub1/sub2');
    

    Note: I had to set the SUB_FOLDER to make the paths resolve correcty.

    Thanks!

    question 
    opened by webbird 16
  • Update some packages

    Update some packages

    1. It seems that lessphp is officially dead - it even can`t compile Bootstrap 3! So i suggest you to replace it to oyejorge/less.php. We already use it in MODX component MinifyX and it works great!
    2. Version 6.0.0 of sabberworm/php-css-parser fails on PHP 5.3.3, so i changed it to dev-master.
    opened by bezumkin 15
  • Image Issue with Wordpress.

    Image Issue with Wordpress.

    I just try this with a wordpress installation. It works fine, except that when a Admin is logged in and view the front page, then in admin bar, Wordpress logo and update icons goes missing. they use a query string by wordpress.

    opened by archergod 10
  • Default image when requested image not exists

    Default image when requested image not exists

    Hi,

    When an image is requested and the source don't exists, is it possible to display a default image? I'm using Munee on a (custom) CDN for products but it isn't known if a product image already exists. Displaying a "No image yet" image is much nicer then showing nothing.

    opened by trizz 10
  • can not load web font correctly that is indicated in css

    can not load web font correctly that is indicated in css

    @font-face {
        font-family: 'Source Sans Pro';
        font-style: normal;
        font-weight: 300;
        src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/toadOcfmlt9b38dHJxOBGOode0-EuMkY--TSyExeINg.woff2') format('woff2'), url('../fonts/toadOcfmlt9b38dHJxOBGNbE_oMaV8t2eFeISPpzbdE.woff') format('woff');
    }
    

    i can not load the font.

    opened by ghost 9
  • Minify css error

    Minify css error

    When trying to minify css using ?minify=true, I get the following error:

    Fatal error: Call to protected Munee\Asset\Filter\Css\Minify::minify() from context 'Munee\Asset\Type' in vendor\meenie\munee\src\Munee\Asset\Type.php on line 88

    opened by e10k 9
  • PHP Warning: Invalid argument supplied for foreach() in Image.php on line 155

    PHP Warning: Invalid argument supplied for foreach() in Image.php on line 155

    Requesting an image, which has not been cached yet, leads to a PHP warning:

    request: "GET image.jpg?resize=h[100] HTTP/1.0"
    
    PHP message: PHP Warning:  Invalid argument supplied for foreach() in ../vendor/meenie/Munee/src/Munee/Asset/Type/Image.php on line 155
    PHP message: PHP Stack trace:
    PHP message: PHP   1. {main}() ../www.static/assetic.php:0
    PHP message: PHP   2. Munee\Dispatcher::run() ../www.static/assetic.php:16
    PHP message: PHP   3. Munee\Asset\Type->init() ../vendor/meenie/Munee/src/Munee/Dispatcher.php:69
    PHP message: PHP   4. Munee\Asset\Type\Image->setupFile() ../vendor/meenie/Munee/src/Munee/Asset/Type.php:131
    PHP message: PHP   5. Munee\Asset\Type\Image->checkNumberOfAllowedFilters() ../vendor/meenie/Munee/src/Munee/Asset/Type/Image.php:95
    

    This is because glob() may return false instead of an empty array which is then passed to foreach (leading to a warning):

    On some systems it is impossible to distinguish between empty match and an error. ... from the PHP documentation (http://php.net/glob#refsect1-function.glob-returnvalues)


    Here's my pull request which fixes this warning:

    • Fixed "PHP Warning: Invalid argument supplied for foreach()" in Image::checkNumberOfAllowedFilters() when glob() returns false
    • Moved Image::checkNumberOfAllowedFilters() and Image::checkReferrer() calls into Image::setupFile() function
    • Removed duplicate code in Image::checkCache()
    opened by elkangaroo 8
  • Strange characters appearing

    Strange characters appearing

    .well { background-color: #FFF; } @font-face {

    The characters appear after the end of one file and before the start of the next. These characters are not present in the original files nor in the copies found inside the cache.

    opened by raccoonie 8
  • How can I add JS obfuscation?

    How can I add JS obfuscation?

    I want to obfuscate JS for minify, for example input: function one(first, second) { alert(first + second); } output: function one(a, b) { alert(a, b); } Is it possible to do that?

    question 
    opened by dfb243fda 7
  • "standalone"

        "require": {
            "php": ">=5.3.2",
            "oyejorge/less.php": "1.7.0.5",
            "leafo/scssphp": "0.1.1",
            "tedivm/jshrink": "1.0.1",
            "imagine/imagine": "0.6.2",
            "coffeescript/coffeescript": "1.3.1",
            "meenie/javascript-packer": "1.1",
            "tubalmartin/cssmin": "~2.4",
            "sabberworm/php-css-parser": "7.0.0"
        }
    
    opened by bubach 0
  • Crop Image from point

    Crop Image from point

    Not sure if this is possible, I've read through the docs and to my eye I think I can't do this, but I'd like to crop an image from point x and y - i.e. using JS to select an area of an image and crop to a size from points x and y on the image.

    Please advise if this could be possible?

    opened by iantearle 1
  • Upgrade version of tubalmartin/cssmin

    Upgrade version of tubalmartin/cssmin

    This is a suggestion of course but I think it'd be great for package consumers to upgrade tubalmartin/cssmin package to latest ^4 version since it's way better (less buggy, more features) than v2.4.x.

    opened by tubalmartin 0
  • Example .htaccess rewrite rule should be easier to find.

    Example .htaccess rewrite rule should be easier to find.

    I still haven't found it.

    Luckily I had a .htaccess file on my desktop from a few months ago when I was supposed to try out munee but got sidetracked.

    opened by thinsoldier 0
  • parsing URL inside file

    parsing URL inside file

    Munee is trying to parse urls inside the the JS file even its commented out. To be exact the URL on the last line of the following file: https://github.com/silviomoreto/bootstrap-select/blob/master/dist/js/bootstrap-select.min.js

    Btw I still have problem with fonts inside stylesheet (font awesome) unless I use .htaccess rule which i am trying to avoid. Can it be fixed somehow?

    opened by blue-eyed-devil 1
  • CSS Relative paths wrongly converted

    CSS Relative paths wrongly converted

    For example, I use font-awesome like this: <link rel="stylesheet" href="/bower_components/font-awesome/css/font-awesome.css">

    Original file excerpt: src: url('../fonts/fontawesome-webfont.eot?v=4.6.3');

    Result: src: url("/\\/bower_components/font-awesome/fonts/fontawesome-webfont.eot?v=4.6.3");

    Kind regards

    opened by rauwebieten 2
Releases(1.7.1)
  • 1.7.1(Feb 8, 2017)

    • fix response content-type header: image/jpeg instead of image/jpg source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types — Grigory Borozdin • 7412e32
    • Update README.md — Cody Lundquist • 2511ab6
    Source code(tar.gz)
    Source code(zip)
  • 1.7.0(Aug 25, 2015)

  • 1.6.1(Jul 24, 2015)

  • 1.6.0(Mar 20, 2015)

    • Implement better CSS parsing to fix relative links. — Cody Lundquist • 5af3a90
    • composer: use PSR-4, drop unused phpunit — Tomáš Votruba • aab0290
    • Update Imagine to latest version. — Cody Lundquist • 8073277
    • phpunit: make output colored — Tomas Votruba • 2adba3c
    • travis: fixed tests - xdebug headers for PHP 5.6 — Tomas Votruba • 4688393
    • Update less/scss libraries and fix compiled scss relative paths. — Cody Lundquist • 0d9a962
    • travis: PHP 5.5+ added, run tests — Tomas Votruba • 4e376da
    • Ignore urls with protocols in CSS. — Cody Lundquist • 9e015ce
    • Fix data:image breaking in CSS when fixing relative paths. — Cody Lundquist • ea8d857
    • Utilise cssmin from tubalmartin to minify CSS. — Cody Lundquist • e7f50f7
    • Update jshrink to correct composer endpoint. — Cody Lundquist • 0ddd00e
    • Rename minify helper to minifyHelper — Jeremy Lindgren • 24401fe
    • Removing some badges — Cody Lundquist • 65b09b8
    • Add in Gitter chat badge — Cody Lundquist • 364aa96
    Source code(tar.gz)
    Source code(zip)
  • 1.5.20(Oct 18, 2013)

  • 1.5.19(Oct 18, 2013)

    • Adding in support to run Munee in a sub-directory. — Cody Lundquist • 7aafc64
    • Adding in max-age in cache control and an option to set it in the dispatcher file. The default value is 0. — Cody Lundquist • 03e2552
    Source code(tar.gz)
    Source code(zip)
  • 1.5.18(Oct 17, 2013)

  • 1.5.17(Oct 17, 2013)

  • 1.5.16(Oct 17, 2013)

    • Fixing an issue with relative paths not converting to absolute paths correctly. This should fix issue #32. I also implemented the feature requests in issue #24, issue #27, and issue #21. — Cody Lundquist • 52c78f6
    Source code(tar.gz)
    Source code(zip)
  • 1.5.15(Aug 22, 2013)

Owner
Cody Lundquist
VP of Eng @ Qualified.com.
Cody Lundquist
The Asset component manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files.

Asset Component The Asset component manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files. Res

Symfony 2.9k Jan 5, 2023
An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

Asset Compress Asset Compress is CakePHP plugin for helping reduce the number of requests, and optimizing the remaining requests your application make

Mark Story 367 Jul 20, 2022
Phraseanet 4.1 - Digital Asset Management application

Phraseanet 4.1 - Digital Asset Management application Main Features : Several GUI : Prod, Admin, Thesaurus, Lightbox ,Report, Metadata Management (inc

Alchemy 201 Jan 6, 2023
GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.

GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT Management Software package, that provides ITIL Service Desk features, licenses tracking and software auditing.

GLPI 2.9k Jan 2, 2023
Doki Doki Literature Club Plus Asset Decrypter

DDLC Plus Asset Decrypter Doki Doki Literature Club Plus Asset Decrypter Used to decrypt encrypted Streaming Asset Bundle files (*.cy) in DDLC-Plus. H

Jim Wu 16 Nov 16, 2022
A Parser for CSS Files written in PHP. Allows extraction of CSS files into a data structure, manipulation of said structure and output as (optimized) CSS

PHP CSS Parser A Parser for CSS Files written in PHP. Allows extraction of CSS files into a data structure, manipulation of said structure and output

Raphael Schweikert 1.6k Jan 5, 2023
Javascript Minifier built in PHP

JShrink JShrink is a php class that minifies javascript so that it can be delivered to the client quicker. This code can be used by any product lookin

Tedious Developments 678 Dec 31, 2022
A PHP implementation of bower :bird:

Bowerphp An implementation of bower in PHP. https://bowerphp.github.io/ Installation $ composer require beelab/bowerphp Configuration Currently, you c

BeeLab 473 Dec 30, 2022
PHP class to generate bookmarklets from Javascript code

Bookmarklet Gen Convert readable Javascript code into bookmarklet links Features removes comments compresses code by removing extraneous spaces, but n

྅༻ Ǭɀħ ༄༆ཉ 13 Oct 5, 2022
NotrinosERP is an open source, web-based enterprise management system that written in PHP and MySql.

NotrinosERP is an open source, web-based enterprise management system that written in PHP and MySql. NotrinosERP contains all the required modules for running any small to medium size businesses. It supports multi users, multi currencies, multi languages

Phương 56 Dec 20, 2022
Commenting program developed with Html & Css & Php JavaScript Languages ​​and MySql

CommentSystem [BETA] Commenting program developed with Html & Css & Php JavaScript Languages and MySql How does it work ? After you set up your Databa

Azad 0 May 19, 2022
Asset Component is a port of Laravel 3 Asset for Orchestra Platform.

Asset Component is a port of Laravel 3 Asset for Orchestra Platform. The component main functionality is to allow asset declaration to be handle dynamically and asset dependencies can be resolve directly from the container. It however is not intended to becoma an asset pipeline package for Laravel, for such purpose we would recommend to use Grunt or Gulp.

Orchestra Platform 54 Mar 31, 2022
https://trapscan.slab.com/public/topics/phase-3-branding-and-optimisation-r3vhj61l

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

null 3 Dec 15, 2022
Asset Management for PHP

Assetic Assetic is an asset management framework for PHP. Project status This project is not maintained anymore. Development has been taken over at ht

Kris Wallsmith 3.8k Jan 4, 2023
Standalone PHP library for easy devices notifications push.

NotificationPusher Standalone PHP library for easy devices message notifications push. Feel free to contribute! Thanks. Contributors Cédric Dugat (Aut

Cédric Dugat 1.2k Jan 3, 2023
PdfParser, a standalone PHP library, provides various tools to extract data from a PDF file.

PdfParser Pdf Parser, a standalone PHP library, provides various tools to extract data from a PDF file. Website : https://www.pdfparser.org Test the A

Sebastien MALOT 1.9k Jan 2, 2023
Standalone Skeltch templating engine for PHP

SkeltchGo is a standalone version of Glowie Skeltch templating engine for PHP, intented to use from outside the framework.

glowie 1 Nov 5, 2021
laravel - Potion is a pure PHP asset manager for Laravel 5 based off of Assetic.

laravel-potion Potion is a pure PHP asset manager for Laravel based off of Assetic. Description Laravel 5 comes with a great asset manager called Elix

Matthew R. Miller 61 Mar 1, 2022
A simple, standalone, modern PHP class inspector and mapper library, wrapping PHPs native reflection in a fluent interface

A simple, standalone, modern PHP class inspector and mapper library, wrapping PHPs native reflection in a fluent interface.

smpl 9 Sep 1, 2022
A standalone Amazon S3 (REST) client for PHP 5/CURL

Amazon S3 PHP Class Usage OO method (e,g; $s3->getObject(...)): $s3 = new S3($awsAccessKey, $awsSecretKey); Statically (e,g; S3::getObject(...)): S3::

Donovan Schönknecht 1k Jan 3, 2023