I want to upload a small website I did using pure JS and some SASS to Github pages.
Now that I uploaded I realized Github pages will not precompile SASS on its own, so I was wondering how could I precompile the SASS file through Github pages.
The simplest way will be to precompile the SASS. Just an example site, input your code here and it will spit out css code for you to put in the files and then you rename them to (whatever).css.
https://beautifytools.com/sass-compiler.php
You could also look into a PHP compiler to compile on-the-fly if it needs to be updated dynamically. This will not work with Github pages though.
Related
I'd like to use SASS and SLIM for my Go project. I'd like the html files to be rendered server side.
I know there is https://github.com/shaoshing/train, but it seems like rendering occurs on the client side, which is not what I want.
There is also https://github.com/yosssi/ace, which is a native implementation of SLIM in Go. However, there is no SASS implementation.
Does anyone have any idea on how to do this?
I recently learn how to use SASS, on local. And I found out that it is possible to use it in a wordpress theme.
I manage to install and use it without problem. But now I want to customize _settings.scss, I don't know how to transform my scss in css (I used Grunt, in a console using ruby to do so in local.)
You should be editing your files locally and uploading once finished rather than modifying files on the server. There should never be any need to compile SASS on the server itself.
If you really have to edit on the server you could login using SSH and start the watcher (install sass and run sass --watch with your settings).
Anyone doing development with meteor and SCSS. How do you get started, there are no packages for meteorite that i could find that compile .scss files into a specific folder?
Have you tried just compiling the sass/scss into css locally during development? Meteor shouldn't complain if you have your config.rb inside of the client folder along with a sass folder and compiled css folder. It should just automatically read the css per norm. Running $ compass watch inside of this client folder where the config.rb resides is an easy way to automate this css compilation. Telescope is a great sample Meteor app that uses sass in this fashion.
--Alex
Just to get this posted as an answer (was posted as comment); bookcasey posted this sample project as well: https://github.com/gdumitrescu/scoreboard which provides some guidance on how to use sass/scss. Hope it helps.
I have seen many questions and differing answers on using the jQuery plugins in the Rails 3.1 asset pipeline, which leads me to believe that this is new enough that it isn't settled science. I have tried using my jQuery plugins in the pipeline, but ran into issues when it came to incorporating the plugin stylesheets.
Now I am trying to back out of that solution, and only put my jQuery plugins and their associated themes and stylesheets in the traditional locations under "public". So, a sort of mixed solution. Then I put the tags back in my layout file to reference these directly.
Of course, now my problem is that Rails only knows to use the asset pipeline, and it's looking in "/assets" for them. They ain't there no more though.
Is there a right way to do this? I don't want to modify these plugins at all, so no changing of the stylesheets or anything else, I want them to just work at this point. Barring a correct way to use jQuery plugins in the Rails 3.1 asset pipeline, is there a way to make Rails use the traditional paths in addition to /assets?
I'm using a tiny gem sprockets-urlrewriter. Citing the readme:
Rewrites relative CSS urls to absolute ones, which means that you can include, for example jQuery UI, without any modifications into the asset pipeline.
So you can put the files in their respective directories and the gem will care about the asset pipeline.
The new rails 3.1 asset pipeline confused me a lot. In rails 3.0.x, with the sass gem, my global css file got updated when I edit .scss files. But in rails 3.1, that doesn't work anymore. It seems like I have to run a rake task to update my css files whenever I modify the .scss files. I feel like I misunderstand something about the new asset pipeline, but I don't know what it is. Can someone provide a solution or explanation to this problem? Thank you.
There are two possible causes of this. I am assuming that you are in development mode, and that all the gems are loaded.
1. Config
In development mode files are compiled on-demand and cached until any changes are made. You have to get the new 3.1 config options set in the right files or this might not work as expected.
Check out the Rails guides section on upgrading.
2. Extensions
The other is getting the extensions in the right order. For scss that would be file.css.scss. This tells Sprockets to parse the files as scss first, and that the have a css extension. If you had .erb on the end - file.css.scss.erb - then erb is processed first, then scss.
Upgrading apps is a bit tricky because so many things have changed. The asset pipeline guide has lots of useful information and advice.
Sass / SCSS has this built in already so you don't have to do ERB pre-processing.
image-url("image.png")
http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets
For me this problem resolved very easy.
I simple deleted all precompiled *.css files from assets/stylesheets and remain all *.scss files. Rails worked fine with *.scss directly, withoutn precompile.