I'm updating a PHP project using PHPStorm. I first started using SCSS by turning on the PHPStorm watch for the file type. It works fine. I then wanted to incorporate Compass. I successfully installed it and ran "Compass create --bare" in my project directory. Now when I include #import "compass/typography/vertical_rhythm", it can't find it. It's not surprising as there is no compass subdirectory. How do I install the required components? Didn't see any Compass option that seemed appropriate. I used the bare option because thats what's the Compass site gave me for an existing project.
Once I get it installed, do I need the Compass watch given I already have a file watcher running for SCSS files? The description of it indicates it does the same thing.
Running OS X 10.8.4
Answering my own question again. I should have plugged away a little longer. I'll leave this in case someone has the same problem.
The #import "compass/typography/vertical_rhythm is resolved by the the Compass compiler. Just running a vanilla SASS compiler isn't going to do it. At this point I make this happen by running compass compile on a bash command line. I haven't been been able to get the PHPStorm watcher to work correctly. A new version of PHPStorm was announced yesterday (5 Sep 2013) with additional support for Compass.
Update
There's another question here asking how to get compass compile to work with PHPStorm. It didn't work as written for me. I made a comment there on the changes I made to get it to do so.
Related
I was using a file watcher in IntelliJ which automatically compiled my less files into css files. I added an argument to the file watcher which used the autoprefix plugin to add all the prefixes to the compiled css file.
I now switched from a windows machine to mac and I can't get it to work like this there. I installed the autoprefix plugin via npm: https://github.com/less/less-plugin-autoprefix
And I set everything like it was on my windows machine: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000659610-Autoprefixer-in-file-watcher
But now I only get the error message:
"Unable to load plugin autoprefix please make sure that it is
installed under or at the same level as less"
Same error occurs when calling the compiling with plugin from the command line. LESS compiling itself is working fine.
Does anyone has an idea what I'm missing? I'm pretty new on Mac so I don't know if I miss some environment variables or something? Or how can I check where the plugin is installed and where do I have to install it?
Thanks to an answer which seems to has been deleted in the meantime I found the solution.
The current autoprefix plugin needs an older version of less. It's not compatible with less 3.0.1.
After uninstalling less and installing version 2.7.3 with
npm install -g less#2.7.3
it is working again.
Found the solution here: https://github.com/less/less-plugin-autoprefix/issues/30
I'm using SASS in my application and i'm in the process of migrating to Azure.
I've got my project setup but it's not compiling the SASS. I'm trying to use the Ruby Installer from here http://rubyinstaller.org/downloads/ (Ruby 1.9.3-p551) and I've uploaded this via FTP to D:/home however when I try to install it simply using the command rubyinstaller-1.9.3-p551.exe it doesn't do anything. No error message or anything either.
Any suggestions?
Using the installer won't work because it probably requires an interactive session. What I did was get the Ruby binaries and FTP those to the website. You can find the binaries as as 7zip file on Ruby download page. I followed along this post: Installing Ruby 1.8.7 (and other stuff) manually. The part about zlib is probably outdated because there is a corresponding dll in the zipped archive already. I did download the other mentioned dll though (the iconv dll) and placed it in the Ruby bin folder.
Gem is already bundled in the package so no need to install that separately.
Unfortunately now I'm having difficulties in getting the gulp task to work because it is still saying "ruby and compass must be installed and in path". I set the path in the gulpfile.
You no longer need to depend on Ruby to compile your SASS.
LIBSASS has 100% parity with RUBY SASS, and doesn't come with the Ruby dependency.
If you're using grunt, you can switch over to LIBSASS by editing your gruntfile.js to use
grunt.loadNpmTasks('grunt-sass');
instead of
grunt.loadNpmTasks('grunt-contrib-sass');
You should also update your package.json file accordingly.
You can then get Azure to execute your grunt tasks as explained in this answer.
I am working on a project which has a number of sass files located in a sub directory called sass. I understand that in order for these files to be generated into css I am required to install ruby and compass.
I've done this. I am on a Windows 7 64bit OS. I downloaded the Ruby .exe from their site and ran it. I ran sass -v to check the version that was installed and it was Sass 3.4.1
Next I went into Netbeans and went tools->options->miscellaneous and went to the CSS Preprocessors tab. From here I entered the path to my sass.bat file which was was follows:
C:\Ruby193\bin\sass.bat
Following this I then restarted netbeans and opened a command line. I navigated to the sass folder of my project and ran the command compass watch however when I make a change to the sass file and save it is not being detected by compass which makes me think I've done something wrong.
I'd appreciate any help with this. I've not got a lot of experience with SASS.
I am using the SCSS-Editor for Netbeans on Windows so that I can edit and compile SCSS files in my projects. SCSS-Editor uses a bundled install of SASS/JRuby, although there is an option to use an external one (I'd prefer not to install the whole Ruby environment just for compiling SCSS files so the bundled one seemed ideal).
For the most part this works fine and I am enjoying using SCSS in my latest project. However, it seems some features of the language (i.e. the %class-name extends) may be unavailable to me due to the bundled SASS being an old version (3.1.20).
I've had a go in the command line (running as admin), but it isn't responding (cursor just there like it expects more). How can I go about updating the bundled SASS install that Netbean's JRuby is using?
Or is there an alternative solution (apart from installing Ruby or using ScoutApp)?
Many thanks
I've done this, but I should add as a disclaimer that I haven't conducted any thorough testing. That said, what I've done seems to work okay.
The "External Runtime" setting is just for the SASS runtime; the embedded JRuby version is still used so there's no messing around with Ruby installation. If you go to the SASS code archive on RubyForge and download and extract the latest tar version (stable is currently 3.2.9) to some appropriate folder, that folder is then suitable for the Sass plugin's "External Sass runtime" location.
The setting (I know you're aware of this, but just to make the answer complete) is in Tools->Options->Misc->Scss and put the folder you created into the SASS/HAML home box which appears when you select External Sass Runtime.
Obviously, there is potential for problems with new SASS on old JRuby and even new SASS on old SCSS-Editor, but my projects seem to compile okay.
We have started to use Sass with Compass for a new project. Currently I'm locally compiling scss to css and committing generated css file to svn (installed in test server) only. And because of that only I can work on Sass files and I want to give the ability to edit sass files to other developers too. and I would also like to setup the workflow in the manner we can work from anywhere, work on .scss file and compile (on save/commit) on server. without having Ruby, Sass gem, compass gem installed on local PC.
How to install sass, compass, chunky png on LAMP server and How to allow everyone to edit and compile .scss to .css file?
and we are also using SVN for version control.
If scss can be compiled to css in non-interactive mode
and
If compilation tools can be installed on test-server
you can try
Save real sources (*.scss) in repository
Post-commit hook in addition to current tasks (export of update WC for reflecting changes in repo) will get task of compiling scss
PS: Can't see any problem here - obvious task and obvious (single!)solution