This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi! My problem is that Compass sprite generation creates a cache buster automatically to the end of the file name. By default that file is added automatically to the project. File name with cache busting looks like this: icons-s9226d77583.png. I end up having lots of files with "icons-{hash}.png" added to the project file and some other developer tries to Publish it fails due to the missing files (old sprite images). I tried to disable cache busting using instructions found from StackOverflow, so that I would have always file called icons.png that would be included in the project file. What is the preferred workflow when working with Web Workbench + Compass + Sprites? |
|
|
The standard workflow is that Compass generates the sprite image when you create a sprite with the "Generate Spriting Import" command and this is added to the project by WW. The problem just comes because you are generating a new file each time (which WW will add as it sees it) but cleaning the existing files using that script without removing the files from the project. Is it going to be easier for you to manually add those files in after generation, or manually remove the olds ones? Since you are deploying using the Publish command you need the project to properly reflect both the files on disk and the files which need to be in the folder structure when deployed so nothing is missing. If its easier to add manually then change the "Add generated files to project" setting under Tools/Options/Web Workbench (under the Compilation section) to False so WW wont add things manually. If its easier to remove manually then you will need to refresh the project and identify missing files after a update to the sprites and then manually remove those files from the project.
|
|
|
Thank you for the reply. I think we soon get to the point where icons are quite finished and therefore it's not big issue to either add new file manually or delete old one like you described. I was just wondering if there would be automatic way to "replace" old sprite file. |
|
|
Unfortunately not. The issue is you are creating a new file each time since the hash forms part of the filename, so we dont know that this is a replacement for an existing file (which one do we replace?), so no, this is something that has to be handled manually. By default Compass creates the spriting file with a consistent name so updates would just be applied to the previously seen file.
|
|