-
Notifications
You must be signed in to change notification settings - Fork 24
Add support for cache busting assets - sync version #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
index.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it!
|
Looks great in general @ferlores! |
|
Great @dgbeck I'll rework your comments and let you know when is ready |
|
@dgbeck I'm also looking into travis: https://travis-ci.org/rotundasoftware/cartero/builds/87563089 |
|
Hi @ferlores . The issue here is that the contents of the bundles, for example, the css bundle, contain the package id The package id is a shasum that is calculated in part from the the full path of the package directory. See Two solutions come to mind. The first is just to not test the name of those bundles. The second is to pass the cartero option In the interest of just getting this PR merged as quickly as possible, I'm fine with just not testing the names of the bundles and we can revisit other options later. |
|
@dgbeck Thanks for the explanation. It kind of makes sense except for the part that in the other tests you are testing for the bundles names (https://github.com/rotundasoftware/cartero/blob/master/test/test.js#L37) and that doesn't fail. Any idea what I'm doing different here that it doesn't work? I'm fine with no testing that but it just gives me a bad feeling not really understanding why it doesnt work in this case. I dont want to introduce bugs here |
|
Hi Fernando, The bundle names themselves are not the issue... It is the package id in On Wednesday, October 28, 2015, Fernando Lores [email protected]
|
|
@dgbeck Ok, finally I've got the issue. The problem is that the shasum for js files is calculated after we do the first pass replacing the content of For now I will comment out that test since I feel it is out of the scope of this change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgbeck that's how I fixed the test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
|
@dgbeck the PR is ready to merge with tests passing, please let me know what you think. Thanks! |
Add support for cache busting assets - sync version
|
@dgbeck thanks for the merge! let me know when you have a chance to publish it |
|
Published to v5.3.0! |
@dgbeck Here is the PR where I calculate the shasum in a sync way so it doesn't need changes in parcelify. I think it makes sense so far. Please let me know what you think.
Related to #43