-
Notifications
You must be signed in to change notification settings - Fork 339
Conversation
This should resolve yeoman#289. This also detects a bad configuration where multiple blocks attempt to write to the same destination with different sources.
/CC @yeoman/yeoman-contributors This seems to be in better shape compared to #324. Can someone review this? |
@XhmikosR i don't have enough comprehension of the codebase to be able to judge this, but I trust your judgement. |
@XhmikosR @sindresorhus It looks like this has been chosen in favor of the alternate PR. What else needs to happen for this to land? Anything I can do to help move this forward? |
Skip duplicate configurations.
Landed. Thanks @boushley :) |
Published as 2.3.0 |
Thanks!
|
Awesome! This works perfectly in my project. |
This is great. Thanks for the PR. In the interest of keeping things DRY, is there a better way to manage "multi-page" apps with usemin? While the error-checking in this version is greatly appreciated, it'd be even better if we didn't have to carefully keep all of our blocks in sync. Some options might be:
|
@schmod That's actually exactly what I am doing. I'm using Metalsmith as a static site generator. I have a partial that lists the script block to be included on each page. It gets rebuilt quickly so local development is still speedy, and I'm not trying to ensure multiple blocks are in sync. I added the code here that ensures that they are the same, just to be sure people didn't accidentally define blocks that would cause a weird and confusing bug when trying to debug it. |
I'm not sure I have the same use case but here's the issue I'm facing, very related to this: index.html:
signin.html
Now my just scaffolded app gruntfile:
A few months ago (latest version) I could modify useminPrepare to:
And it would generate index.12345.css and signin.12345.css and correctly replace them in the .html files as needed. This doesn't work anymore and it throws me:
How can I achieve this with the newest version? Thank you. |
+1. I'm using generator-jekyllrb with custom designs for different pages but with shared main.css, modernizr.js and main.js files across the site. After updating, I'm finding that it will no longer let me scan multiple html files to find all the custom css/js files:
If I can't get it to scan all the html files and ignore duplicates, is there any way to bypass useminprepare and manually tell it which files to use? The way I'm doing it at the moment is to create a throwaway |
+1. Is there some updates? |
+1 Any Update? |
@plrthink @mCarini86 we just got PR #496 in time for the This fixed my use case, similar to what @richardwestenra described (sharing main.css across multiple html pages), the only downside is that I have to use the force option now... |
This should resolve #289.
This also detects a bad configuration where multiple blocks attempt to write
to the same destination with different sources.
I realize #324 is already a PR for this, but the method taken in that PR is O(n^2) and this avoids that extra looping. This PR also has tests.