Git Product home page Git Product logo

Comments (3)

mbuczko avatar mbuczko commented on August 18, 2024

Hi,
Sorry for a late answer, I've just came back from vacations.

CSS fingerprinting is definitely something on my todo list. The only thing I still didn't clearly figure out is how transform HTML files/templates, so they could point to valid (fingerprinted) resources. I guess I would need to provide kind of additional templating. Any suggestions?

from revolt.

kirillsalykin avatar kirillsalykin commented on August 18, 2024

No problems, hope your rest was good :)

I've been thinking about having another task which will copy index.hml and replace links. but my approach is a bit different from what currently used - I treat index.html as static file (similar to css/js) - thus no selmer used.

from revolt.

mbuczko avatar mbuczko commented on August 18, 2024

a new built-in task has been added - assets which hopfully solves that issue.

assets task takes :source-paths and tries to fingerprint every file inside (along with everything that already has been already created in target/assets directory, used eg. by sasstask). it's possible to exclude some paths with :exlcude-paths (which usually makes sense for scss/sass files which should not be fingerprinted and included into final artifact). the tricky part is to find all assets which refer to fingerprinted ones (like htmls referring to styles/scripts or css-es referring to images) and replace occurences.

to do so a :assets-holders option has added which configures a collection of extensions of static assets in classpath to scan, like ["js" "css" "html"]. All fingerprinted assets found in there will be updated accordingly.

I suggest to take a look at sample revolt-edge in case of any problems.

from revolt.

Related Issues (4)

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.