Giter VIP home page Giter VIP logo

swcombineplugin's People

Contributors

digitarald avatar rande avatar yohang avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

swcombineplugin's Issues

YUI Compressor

Seriously, no YUI compressor?

Must have, should be in drivers by default. I will attach it here when I finished it.

Windows compatibility

The current revision of plugin doesn't work on windows servers, here are 2 patches to fix the issue

Index: swCombineStylesheet.class.php
===================================================================
--- swCombineStylesheet.class.php   (revision 47)
+++ swCombineStylesheet.class.php   (working copy)
@@ -140,7 +140,7 @@

     if($file)
     {
-      return 'url('.$file.')';
+      return 'url('.str_replace('\\', '/', $file).')';
     }

     $this->logSection('fix-image', 'unable to find the file : '.$matches[2]);

AND

Index: swOptimizeCreateFilesTask.class.php
===================================================================
--- swOptimizeCreateFilesTask.class.php (revision 47)
+++ swOptimizeCreateFilesTask.class.php (working copy)
@@ -146,9 +146,10 @@
       ->maxdepth(0)
       ->in(sfConfig::get('sf_app_module_dir'));

+    $r = str_replace("\\", '/', sfConfig::get('sf_app_module_dir').'/');
     foreach($app_modules as $module)
     {
-      $modules[] = str_replace(sfConfig::get('sf_app_module_dir').'/', '', $module);
+      $modules[] = str_replace($r, '', $module);
     }

Unable to replace file

Salut Thomas,

J'ai l'erreur suivante :

Unable to replace file "(...)web/sw-combine/frontend/aa9b219f67624074aa6ae611eb06bda0.js" with optimized contents

Voici ce que donne un ls -la :

ls -la web/sw-combine/frontend/

total 128
drwxr-xr-x 2 restaurant-levasion restaurant-levasion 4096 2011-03-15 11:53 .
drwxr-xr-x 3 restaurant-levasion restaurant-levasion 4096 2011-03-15 11:52 ..
-rw-r--r-- 1 root root 29499 2011-03-15 11:53 12484cee2a614e047c4c9ea7cbc4f95c.css
-rw-r--r-- 1 root root 23301 2011-03-15 11:53 1f034bb723f35c9164cf653ca7764d41.js
-rw-r--r-- 1 root root 24138 2011-03-15 11:53 459cb1dc4fa76b8c3948dfa4933b8890.css
-rw-r--r-- 1 root root 0 2011-03-15 11:53 aa9b219f67624074aa6ae611eb06bda0.js
-rw-r--r-- 1 root root 39589 2011-03-15 11:53 aa9b219f67624074aa6ae611eb06bda0.js.tmp

References to optimized files get not included in the templates.

I created the right packages (my_package) in config_handlers.yml and ran the optimization scripts successfully. Unfortunately, when I include this in any view.yml file

sw_combine:
include_packages:
javascripts: [my_package]
stylesheets: [my_package]

the include do not pull in anything via the sw_include_stylesheets(); or sw_include_javascripts(); helper functions.

Tried everything, nothing seems to work.

Public path

The sw_include_stylesheets() (and js equivalent) doesn't seem to consider the 'public_path' setting. My CSS and JS is properly combined and placed into 'web/assets' but when the pages are rendered they link to the files like /459cb1dc4fa76b8c3948dfa4933b8890.css. As if they were in the web root.

'private_path' is set to "%SF_WEB_DIR%/assets" and 'public_path' to "/assets".

When I tried to set them to only "%SF_WEB_DIR%" and "/" then it worked. Only then it wiped everything else in my web root, like the index.php and robots.txt.

Also, possibly related, my setting for 'version' is not detected in the helper. I tried printing the $params variable in the helper but go only the the default false value for 'version'.

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.