Giter Club home page Giter Club logo

Comments (9)

Shadowfiend avatar Shadowfiend commented on June 23, 2024

Interesting. That would definitely be a problem (we don't use any caches in front of our stuff (yet)). The querystring addition is actually part of the Lift snippet, rather than this sbt plugin itself. The plugin provides the data to do the querystring addition.

That said, I may add a toggle option for the query string in the gist for the snippet so that that particular aspect is supported. Does that seem reasonable?

from sbt-resource-management.

Shadowfiend avatar Shadowfiend commented on June 23, 2024

WARNING Failed to fully read heh.

Renaming the file is an interesting problem. At the moment we let the AWS handlers calculate the checksum for the file. I suppose we could do the calculation ourselves, continue to encode the versions the same way, and have a setting that toggles whether the filename includes the checksum or not. We can then maybe pass that setting on to the Lift app via System.setProperty and update the snippet gist to check that property and decide whether to append before the extension or after the query string depending on what it's set to.

from sbt-resource-management.

eltimn avatar eltimn commented on June 23, 2024

I guess I don't see how that would work, if say, you're pushing the files up to S3. The filenames would have to be changed to add the MD5 hashes. I think it would need to be part of the sbt build process.

I haven't looked at the source yet, so I may just be misunderstanding what you're proposing.

from sbt-resource-management.

eltimn avatar eltimn commented on June 23, 2024

That sounds like it would work.

from sbt-resource-management.

Shadowfiend avatar Shadowfiend commented on June 23, 2024

The one complication I'm seeing is how to properly communicate the include-checksum-in-filename vs as querystring option to the application. A property won't really work because in production you don't usually run your application through sbt, so the plugin wouldn't get a chance to set the property.

Maybe it could be encoded in the versions file? Makes the format a little more complicated, but it could just be that the first line is a checksums-in-filename=true or =false to indicate which to do.

from sbt-resource-management.

eltimn avatar eltimn commented on June 23, 2024

I assumed you would put it in the versions props file. Or, you could create a separate props file just for it.

from sbt-resource-management.

Shadowfiend avatar Shadowfiend commented on June 23, 2024

I'll pick one. I'll try and push something for this either later today or tomorrow.

from sbt-resource-management.

Shadowfiend avatar Shadowfiend commented on June 23, 2024

@eltimn If you want to give the above solution a shot, setting checksumInFile in ResourceCompile := true should now include the checksum in the filenames.

from sbt-resource-management.

Shadowfiend avatar Shadowfiend commented on June 23, 2024

Going to go ahead and close this issue. In my tests, it produces results as required; let me know if you run into any issues.

from sbt-resource-management.

Related Issues (18)

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.