Atualize o rubygems e instale o Compass, o SASS é instalado automáticamente.
sudo gem update --system
sudo gem install compassThis will enable Sass+Compass with LiveReload through Guard. (Guard screen cast)
You will also need a browser component to communicate with LiveReload. (browser extension, livereload.js)
If you prefer going through a GUI, that option is available. The following instructions is specific to Mac OS X and it works through the command line.
Note that this is not specific to Rails projects. This can work for any standalone front-end project.
Isso é util para garantir que a sua aplicação funcione sem problemas no futuro ou por exemplo se você tem projetos usando diferêntes versões do Sass ou Compass.
É necessário instalar o bundler (http://bundler.io/)
$ gem install bundler##Tirando uma foto na hora do commit com Mercurial!
Instale o imagesnap
brew install imagesnapNo arquivo ~/.hgrc
| /* | |
| Pré-carregamento de imagens | |
| */ | |
| preloadImage = function(url, complete) { | |
| if ( preloadImage.cache[url] ) { | |
| complete.call(null); | |
| return; | |
| } | |
| var img = new Image(); | |
| img.onload = function() { |
| // ---- | |
| // Sass (v3.3.14) | |
| // Compass (v1.0.0.rc.1) | |
| // ---- | |
| div{ | |
| $v: str-slice(padding, 0, 1); | |
| content: "#{$v}"; | |
| } |
| // ---- | |
| // Sass (v3.3.14) | |
| // Compass (v1.0.0.rc.1) | |
| // ---- | |
| $sizes: ( | |
| -es: 10px, | |
| -s: 20px, | |
| -m: 30px, | |
| -l: 40px, |