Compass Sprite Filename - sass

I am trying to control compass sprite filenames.
My deployment scripts require that images be included in the project file (.Net).
Since compass creates new files each time it renders the sprite (to break caching, I presume)., I have to explicitly get rid of the old reference and add the new.
Has anyone had experience with this?
I don't really want to use an after_build script, but if that's what I have to do I'll take all the suggestions you've got.
thanks.

If you assume to break the caching, you can look at my answer to the question How to turn off COMPASS SASS cache busting?, which automatically created a copy of sprites without hashing.

Related

Download multiple files from a website instantly

There is this website called Texture Haven, which has a lot of free textures to use for blender, only problem is it takes a lot of work to download them all manually.
So my question is: Would there be a way to download them all instantly with some kind of script?
Texture Haven: https://texturehaven.com/textures/
Have you tried looking for web-downloaders with Python? I'm not sure if it will work but you can try some of these:
1. https://www.geeksforgeeks.org/downloading-files-web-using-python/
2. https://pypi.org/project/pywebcopy/
3. https://www.codementor.io/aviaryan/downloading-files-from-urls-in-python-77q3bs0un
Let me know if this works out for you. Otherwise you'll just have to manually download the packages. You could also try out other websites for blender textures like:
https://texture.ninja/ not sure if you can install entire packages at once but it's fairly easy to install lot's of textures.
You could also look for some add-ons for blender like https://www.blenderkit.com/
I hope this works out for you and happy blending!
Edit: format

Why does the singularity markup simply disappear from my .scss file?

I'm 3 days new to singularity and for the past 2 days have had the issue where only my singularity ($grids and $gutters) markup disappears from my .scss file.
I know that the markup has compiled because the grids and gutters are present and functional even though no longer present in the .scss.
The most bizarre (possibly telling) part to the story is that commented singularity markup has never disappeared.
Anyone else experience this? Anyone have a solution?
osx 10.9.1/bbedit 10.5.7/compass (0.12.2)/sass (3.2.13)/singularitygs (1.1.2)
Neither among Sass, Compass and Singularity modifies your .scss sources.
It might be your source code editor, or some GUI Sass compiler, or a virus, or a glitch in the Matrix.
Get control over your computer.

Compass watch with sprites slow

I have a relatively big sass project with quite a few sprites. When I have compass watch running and make a change, the project takes a few seconds to compile because checking the sprites takes a long time. The sprites are NOT actually getting overridden or anything (unless of course I change the images) but just the process of checking each image takes a while. Is there a way to run compass watch while ignoring sprites just to speed things up? Then if I want to change sprites I can just manually compile.
I've been searching for a solution to this as well. A not great (but working solution) can be found here: Codekit Compass vs Less compilation when spriting
Basically I have a sprites file allSprites.sass which creates allSprites.css. I then put that into _sprites.scss and import that into my main.sass file.
If I could automate moving the allSprites.css into the _sprites.scss on change of the allSprites.sass file my life would be complete =)

Sprite generation Compass/SASS

I'm using Compass Sprite helpers in a project which works great. However the generation of the sprite adds quite a few seconds to the project compile time and most of the time I do not need it regenerated.
Is there a way to turn off the sprite generation and get compass to use the last generated file?
I'm using CodeKit and I'll be easily confused by much talk of command line / Ruby!
I've just tried it, and for me Compass does not recompile my sprites unless i modify the contents of the sprites folder:
$ compass compile
unchanged images/sexy-sce786a2ec5.png
overwrite stylesheets/screen.css
Try compiling your project with the compass command line tool instead of CodeKit. If it works out, please check that CodeKit uses Compass to compile your project and not vanilla SASS.
It looks like a CodeKit issue which is getting fixed:
https://github.com/bdkjones/CodeKit/issues/297
Until then I am using a workaround detailed here.
It looks as if compass compile with no other arguments (as per Andrey 'lolmaus's answer) does not cause this, but if there are any arguments at all it sets the :force option to true, and one of the consequences of that is that sprites are forcibly recreated.
That seems like crazy behaviour?
For the moment I've edited lib/compass/commands/update_project.rb (specifically, in my case, ~/.rvm/gems/ruby-1.9.3-p429/gems/compass-0.12.4/lib/compass/commands/update_project.rb) and commented out the parser.options[:force] = true line in the parse_arguments! function at the end of that file.
(note the unless arguments.empty? condition)
That seems to have disabled sprite generation entirely (i.e. even when you need it), but I can enable it manually with compass compile --force ...
That's certainly good enough for me.

Fastest and most efficient way of converting **haml** and **scss** files? (Ruby on Windows)

I'm a ruby/haml/sass-beginner. I just installed ruby and rails for windows, haml, and sass (stand alone and plugin for rails).
I know how to convert and haml file into a html file (and vice versa):
haml index.haml > output.html
and how to convert a scss fiel into a css file (and vice versa):
sass --watch style.scss:style.css
I save more time converting scss files because every time I save a scss file the corresponding css file is automatically updated (i think that's the suppose of the watch command)
but for the haml files, I'm still doing it manually (haml index.haml > output.html).
I believe there's other ways to save time converting haml and scss files.
Any suggestions?
When you setup Rails to work with Haml, then start your development server, the Haml in your views get converted into HTML for you on-the-fly, so there's no need to watch for changes to your Haml separately.
However, if you're creating prototypes using just Haml and SCSS and not using the Rails stack at this stage, then there are a couple of useful tools you can use that automatically render your Haml and SCSS on page refresh:
Serve
http://github.com/jlong/serve
StaticMatic
http://github.com/staticmatic/staticmatic
Of these two, Serve is easier to use, but is not as powerful as StaticMatic. With Serve, all you need to do is install it (gem install serve) and type serve at the command line in the directory containing your Haml files. Then point your browser at http://localhost:4000. Full details here.
You can also hook-up Serve to make use of Compass the Sass meta-framework (which is awesome). There's a full tutorial here.
Oh, there's also dynamicmatic now too which might be good as well to look into. Basically similar to staticmatic but with some obvious differences that might be useful. I've used SM quite a lot recently and really like it. Very easy to use, very simple to set up and really does most things I need it to.

Resources