Code Monkey home page Code Monkey logo

Comments (7)

addyosmani avatar addyosmani commented on June 19, 2024

As per the readme, the project doesn't yet support detection of styles dynamically added via JavaScript. Is this the problem you're running into at the moment? If not, it may be that our parser is breaking due to something in your templates. Once you've clarified I'll be able to comment further :)

from grunt-uncss.

seifsallam avatar seifsallam commented on June 19, 2024

I think parser is breaking because of something in templates. Because some styles get loaded knowing that it is only defined in .hbs files. I'm thinking this has something to do with bindings? {{bind-attr class="my-class"}} or {{view App.TextView classNameBindings="class"}}

If thats the case would it be possible to have a variable to set in uncss to give it alternative names or aliases?

from grunt-uncss.

wololodev avatar wololodev commented on June 19, 2024

@addyosmani does that also mean it does not work yet with single page apps with pushStates or "#!" ?

from grunt-uncss.

ryrych avatar ryrych commented on June 19, 2024

bump :)

from grunt-uncss.

addyosmani avatar addyosmani commented on June 19, 2024

It should work fine with single page apps and apps using templating for the views. We're going to try putting together a sample to demonstrate this. Btw, where possible I recommend running uncss as a post-processing step once you've compiled templates and anything else your build needs to do. Attempting to run it against raw template files won't work as we need to be able to run the rendered markup straight-up in Phantom.

from grunt-uncss.

addyosmani avatar addyosmani commented on June 19, 2024

Just to clarify: so, point uncss at the URLs where your final views/templates are being consumed.

from grunt-uncss.

ryrych avatar ryrych commented on June 19, 2024

Thanks for clarifying this 👍

from grunt-uncss.

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.