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
|
Can you add support for sass partials?: http://sass-lang.com/docs/yardoc/file.SASSREFERENCE.html#partials Basically 2 things: First, if I have a file called "_somefile.scss", then I can import it with code like:
Both the intellisense engine and the compiler should be able to handle this. Second, if I add a new scss file to the project, and it starts with an "_", then it should default to "do not compile". This one is not as important as the first one above, since I can work around it by changing the setting after I add it. But the first one is pretty important if I want to use the Compass framework since all of its files are partials. Right now, if I compile an import like the above, nothing happens. I get no error and my css file does not update. Intellisense does put little squigglies under the import though, warning me that the file cannot be found. Thanks! |
|
|
Correction: It looks like the compiler does the right thing. It is just the intellisense engine that gets confused. And the "dependency" manager. ie if I edit "_somefile.scss", the files that import it are not automatically recompiled. |
|
|
The intellisense is already updated in the latest nightly build (see the sticky FAQ thread for how to get hold of this). The dependency manager will be updated in the next nightly build, available from about 1200 GMT. Let us know if you still see problems! (We will try to get round to defaulting compilation of files beginning with an underscore to off, but that's a lower priority and we're rather heavily loaded at the moment -- sorry!) |
|
|
By the way, current nightlies also provide a way to make intellisense pick up Compass framework stylesheets, by entering the Compass installation path into Tools > Options > Web Workbench. If this path is set, then @import statements beginning |
|
|
Thanks. I'm new to compass so I just copied their scss files into my resource folder so I don't need that setting. Though I discovered that many of their files do an @import "compass/..." and so I had to edit those instances to make it all work. But now I've discovered that Compass requires a modified compiler. They've added a number of sass extensions as additional Ruby functions: https://github.com/chriseppstein/compass/tree/stable/lib/compass/sassextensions And so many of their mixins will fail to compile using the compiler built into Web Workbench. Bummer! |
|
|
Yes, this is why we've not tried to implement full Compass support as yet. The best we can practically do for now is to get the Intellisense and squigglies working with Compass; but for compilation, for most scenarios Compass users will still need to use the standalone Compass compiler. This is on our radar and we know people are keen for it; it's just a matter of finding the time. |
|
|
Just to provide some more datapoints on using Compass with WebWorkBench: If I stay away from the Compass mixins that require their special extensions, I can compile just fine using your compiler. But it is extremely slow. A 20 line scss file that @imports "compass" and compiles into a 30 line css file takes 45 seconds to compile each time I save. Essentially unusable. I looked around and found pyScss, a scss compiler written in Python. I downloaded it and made a few tweaks and it is able to compile the same file above in 300ms. That is 150x faster than the ruby compiler embedded in your extension. It has the added bonus of supporting the compass extensions so I am able to use all of the compass features. I then went to see if I could get your extension to use this python compiler. I visited...
and monkey patched Sass.zip\Sass\lib\sass.rb to modify the compile method you call to call out to the pyScss and use those results instead of executing using the ruby compile engine (see pasted code below). This seems to work rather well in my very limited testing. I plan on running this through its paces over the coming weeks to work out any incompatibilities I come across. This has the added advantage that I can also embed pyScss as a build step so our continuous build server can compile all of the scss files. The only problem is I'll have to re-patch Sass.zip each time the extension upgrades. But that's a small price to pay. Based on this, and on the other thread about forking the less compilers, here's a suggestion for you: Perhaps you can add a setting to your options screen which would let users assign their own compiler command line to use for a file type. If supplied, your extension would just execute the command using code vaguely similar to the popen() code below. Command would be expected to read the source from stdin and write the compiled code to stdout. It would send warnings and errors to stderr. Non-zero status code means the compilation failed. Zero status code means any stderr messages must just be warnings. It would be nice if the extension passed the filename of the source file along with any options along on the command line just so the custom build tool could make use of the filename for whatever purposes. I don't know the feasibility of the above, but it might be an easy way to let users customize the build to their heart's content without a ton of effort. If that were a Pro feature, I know I'd get my project team to go Pro for access to it.
|
|
|
+1 for the possibility to set a third-party compiler to Web Workbench (pro edition). Would be very handy with Compass. |
|