Code Monkey home page Code Monkey logo

Comments (16)

markstory avatar markstory commented on May 18, 2024

I've not run into this before. However, the cache files will only be written if debug = 0 and the cacheFiles config setting is true.

Normally if AssetCompress can't find a source file it tries to log a message. If the issue is coming from a missing file, check your app's logs, there might be something there. I can add the extra folder import though, it won't hurt anything.

from asset_compress.

rynop avatar rynop commented on May 18, 2024

thanks for the quick reply. I figured it out.

So turns out I do need to add the import of Folder to 89, otherwise I always get that error.

The reason why my css was not rendering was because the CssStripCommentsFilter seems to not like some comments in one of my css files, and it was regexing out all my css files. I tried for a while to figure out what exactly in the comment was causing problems - its actually a 3rd party library I use called qtip2, here is the comment block that is causing it to fail - i narrowed it down to the 3 lines beginning with 'Dual licensed...'. From a quick look at ur regex i dont see why that would be causing problems...

/*
* qTip2 - Pretty powerful tooltips
* http://craigsworks.com/projects/qtip2/
*
* Version: 2.0.0pre
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPLv2 licenses
*   http://en.wikipedia.org/wiki/MIT_License
*   http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Sat Jan 15 15:15:02 2011 +0000
*/

I'm cool with leaving comments in there, not that big of a deal given what i'm really looking for is to use your build shell as part of my production build scripts, to make my css/js files so i can upload em to my CDN.

yea duh I shoulda known the debug has to be 0 to write the file.

from asset_compress.

Phally avatar Phally commented on May 18, 2024

I'll have a look at that comment block later. In the mean time you could just disable the strip comments feature. Your config file shows you are using CssMin and that should remove comments as well.

from asset_compress.

Phally avatar Phally commented on May 18, 2024

I can't reproduce this in any way. I added it to a file and it was stripped correctly. Changed the committed version a bit so there aren't any weird copyright issues, but I tried with exactly the one you pasted.

-Mark, you could merge it in for next time.

from asset_compress.

rynop avatar rynop commented on May 18, 2024

I wonder if there is some strange encoding or something in the file. I can send you the file Phally if you want (email?). CssMin handles it just fine.

Mark - can you also add the App::import('Core', 'Folder'); in models/asset_compressor.php on line 89 when your in there?

thanks.

from asset_compress.

Phally avatar Phally commented on May 18, 2024

Yeah, i am one step ahead.. I got it failing on windows line endings, I am trying to fix it now.

from asset_compress.

Phally avatar Phally commented on May 18, 2024

Can you try my fork? I think it fixes it. However I don't have test cases for it, because making everything have windows line ending would screw up the test case. So your script is my test case hehe.

from asset_compress.

rynop avatar rynop commented on May 18, 2024

Yup that fixed it - stupid windows. You'll probably want to make a similar change to JsStripCommentsFilter obj.

from asset_compress.

Phally avatar Phally commented on May 18, 2024

Yes, you are right, forgot about that one. Those things are all fixed now. And yes, stupid Windows! The person who thought different types of line endings was a good idea needs a bitchslap.

from asset_compress.

rynop avatar rynop commented on May 18, 2024

coo man thanks. Once you guys put in the 'App::import('Core', 'Folder');' change I'll close. Or would u prefer I open another issue for that?

from asset_compress.

Phally avatar Phally commented on May 18, 2024

Nay keep this one open, it has the right title. I was holding back on that one for Mark, not sure if he added the line locally.

from asset_compress.

rynop avatar rynop commented on May 18, 2024

ok thanks. keep it up, this plugin freaking rocks.

from asset_compress.

markstory avatar markstory commented on May 18, 2024

Thanks for the patches Phally! I've merged them in and added the missing import.

from asset_compress.

Phally avatar Phally commented on May 18, 2024

Its the least I could do, since it is my fault it wasn't working in the first place hehe. Thanks for merging.

from asset_compress.

rynop avatar rynop commented on May 18, 2024

I don't see the App::import('Core', 'Folder'); added in the latest source ( https://github.com/markstory/asset_compress/blob/master/models/asset_compressor.php line 89). Is it in some other branch or something?

from asset_compress.

markstory avatar markstory commented on May 18, 2024

No I forgot to both commit and push the change :( It should be there now though.

from asset_compress.

Related Issues (20)

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.