Comments (9)
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.
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.
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.
That sounds like it would work.
from sbt-resource-management.
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.
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.
I'll pick one. I'll try and push something for this either later today or tomorrow.
from sbt-resource-management.
@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.
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)
- Colm's Beard
- The copy-scripts task does not watch javascript files. HOT 1
- Bundle Mixins HOT 4
- Typo in README HOT 1
- Expected end of input running any resources: command HOT 2
- Undefined settings errors and how to override the default paths HOT 27
- SBT Plugin Install: End of Input HOT 5
- JavaScript files are not watched for changes (for auto compilation) HOT 2
- Everything explodes if stylesheets doesn't exist
- Compiled coffeescript sources not accessible in development mode HOT 4
- Snippet causes templating to stop HOT 6
- Why we always got to be forceful? HOT 1
- /n /n /n
- Add support for IAM roles instead of specified AWS credentials
- We're not dropping coffee scripts in subdirectories of that JS target when we should.
- Implement the ability to reference URLs in bundles. HOT 1
- Update sbt-resource-management or abandon? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-resource-management.