Giter Site home page Giter Site logo

assets's People

Contributors

bradstinson avatar serafimarts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

assets's Issues

css preprocessor support

Please add a method to specify a CSS preprocessor callback.

This is what I do with Casset:

     Casset::set_post_load_callback(function($content, $filename) {
                if (pathinfo($filename, PATHINFO_EXTENSION) !== 'less') {
                    return $content;

                } else {
                    $less = new lessc();
                    $less->addImportDir(ASSETS_PATH.'/stylesheets/import');
                    return $less->compile($content);
                }
      });

Optimise performance of static file delivery

Super clean and useful class!

I have one performance issue, in the "renderAssets" method you create the minify object in the beginning. Also the $last_modified is created. But in case we want to serve the static file these objects are unnecessary and bad from performance.

Just from a performance perspective, wouldn't it be better to do only the absolute necessary to deliver the static file, and in case that one is missing create the objects needed to do that?

all the best // johannes

Problems with Error Suppression and Exception Class

Tonight I ran into an issue where the permissions for my cache folder are incorrect, and it caused the following error:

Fatal error: Class 'Assets\Minify\MinifyException' not found in /var/www/html/hosting/vendor/bradstinson/assets/src/Minify/Minify.php on line 106

I was able to solve the underlying problem of the permissions, but I thought you'd like to know this isn't calling the class properly. I haven't had time to go back and fix it myself, but thought it should be recorded in case someone has the time to fix it before I get back to it.

Composer Autoload Failing

Perhaps I am doing something wrong, but shouldn't this stuff load through the composer autoload?

I have added your project to my composer.json, ran update. Now however I can't get your class to load. I can see it was added to the classmap, but still can't get it to load. Was wondering if you might be able to suggest what I am doing wrong.

Thanks!

Typo in Readme.md

Just a small typo in readme.md, on lines 127,132

Assets::setPath('public/assets/')); //There is additional )

BaseURL

Assets::setBaseurl('/')); //And here too

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.