Closed necolas closed 10 years ago
It should be tested against the Sass test suite.
There have been a few previous attempts in this area. @jonathantneal knows the status of them all I believe.
+1, and not only for writing extensions and fixes. Several developers, including the front-end team I work in, would have Node.js as the single dev dependency - if it weren't for Ruby+Sass.
Ey, would be good, lads. The status is sad at the moment. It may be my next project after jsml.
tj did this a long time ago: https://github.com/visionmedia/sass.js
There's already a node module in progress, being built on top of libsass so we can make language consistency across languages work smoothly. I think @hcatlin knows who is working on it.
There are already some projects:
Or you can simply use Stylus, which can be written just like SCSS (though I didn't test it against the Sass test suite): http://learnboost.github.com/stylus/
Nice. Some of those ports look unmaintained. I assume that the port @chriseppstein is talking about is going to be the "official" port?
@chriseppstein is this in active progress? I've got other things I could be building, otherwise.
I had no success with those other ports that @fhemberger mentioned. We spent one very late night trying to get any one of those going on the client-side (which is a synonymous goal I would have for the port). Anything made by visionmedia is a dud now because they want us to switch to Stylus anyway.
I only saw some tweets. But I would vastly prefer an implementation based on libsass to a from-scratch implementation.
I'll get back to you.
@chriseppstein, I'm getting mixed messages.
Is this the tweet you are referring to?
@teabass - 8:50 AM - 24 Apr 12 - https://twitter.com/#!/teabass/status/194815507218702336
Attempting to make a node.js wrapper for libsass before #LNUG lightning talks tomorrow!
And it this your tweet just the day before?
@chriseppstein - 8:14 PM - 23 Apr 12 - https://twitter.com/#!/chriseppstein/status/194625211646222336
Regarding libsass, ruby remains the primary reference implementation of the language. Expect libsass to lag behind the official feature set.
I think it's still worth-while to, at least, dabble in cutting our own.
@jonathantneal My tweet means that the releases will not be coordinated to go out on the same day. The libsass team has committed to building a 100% compatible sass implementation. It seems to me that having a bunch of independent from-scratch implementations just means that users will be very confused by small inconsistencies.
That said, we are committed to isolating our language tests so that they can be used to verify other sass implementations -- seems to me that you'll want to build on top of libsass, but if you prefer pure js for some reason, then by all means, go ahead, I just don't want to wind up with another half-implemented, unmaintained JS port.
we are committed to isolating our language tests so that they can be used to verify other sass implementations
awesome
@chriseppstein thank you for clarifying. I'm excited about those tests. I was just looking for a sample of sass or scss that demonstrates all of the features available in sass being used.
Yeah, Andrew is working on a node.js wrapper for libsass. I've CC'd him as I know he'd love help on the project.
On Apr 26, 2012, at 10:03 AM, Jonathan Nealreply@reply.github.com wrote:
@chriseppstein thank you for clarifying. I'm excited about those tests. I was just looking for a sample of sass or scss that demonstrates all of the features available in sass being used.
Reply to this email directly or view it on GitHub: https://github.com/h5bp/lazyweb-requests/issues/71#issuecomment-5362521
CCing @andrew in :)
As Hampton mentioned, I've been working on a c++ wrapper for libsass: http://github.com/andrew/node-sass
The idea being to provide a javascript interface to the three uses and an connect/express middleware for automatically converting scss files to css.
Any help or pull requests welcome, I'm having some issues building and linking to libsass via node-gyp at the moment.
+1 for this! This would be so good! Been thinking on jumping the SASS bandwagon from LESS, but don't really want to dive into Ruby or even if I or someone from the team would know Ruby, it still would mean we would have to make our build process more complicated.
Would be super nice if there'd be Node.js port of SASS!
Maybe this is a weird idea, but can´t we use the emscriptened Ruby and let the original sources of sass and compass run on that thingy?!
libsass will be a million times faster than emscripten'd ruby.
:+1: a big plus one for SASS in node.js
I've now got an initial build working for node-sass: https://github.com/andrew/node-sass
Basic usage is to take a string of scss and return the css for it:
var sass = require('./sass');
sass.render('body{background:blue; a{color:black;}}');
I'm now going to work on making the api nicer and express middleware.
I got the connect/express middleware working on this last night, any help kicking the tires would be much appreciated: https://github.com/andrew/node-sass
Can I get access to it? Might do a quick round of interface cleanup and want to help keep you up to date.
On Apr 28, 2012, at 2:51 AM, Andrew Nesbittreply@reply.github.com wrote:
I got the connect/express middleware working on this last night, any help kicking the tires would be much appreciated: https://github.com/andrew/node-sass
Reply to this email directly or view it on GitHub: https://github.com/h5bp/lazyweb-requests/issues/71#issuecomment-5395712
Added you as a contributor, go wild!
Sent from my iPhone
On 28 Apr 2012, at 15:59, Hampton Catlinreply@reply.github.com wrote:
Can I get access to it? Might do a quick round of interface cleanup and want to help keep you up to date.
- Hampton
On Apr 28, 2012, at 2:51 AM, Andrew Nesbittreply@reply.github.com wrote:
I got the connect/express middleware working on this last night, any help kicking the tires would be much appreciated: https://github.com/andrew/node-sass
Reply to this email directly or view it on GitHub: https://github.com/h5bp/lazyweb-requests/issues/71#issuecomment-5395712
Reply to this email directly or view it on GitHub: https://github.com/h5bp/lazyweb-requests/issues/71#issuecomment-5397350
Any update on SCSS to CSS in node? Would love this :)
Ohh so it supports SCSS - didn't see that the first time I read it; thanks!
.scss is just the extension for Sass. Sass is "SCSS" is Sass.
Now, there are .sass files that use the indented syntax, but that isn't the target Sass syntax anymore.
The project isn't ready to be a stand-alone node module. Will keep watch.
Is this project (node-sass) ready now ? It seems there is a lot of works (also libsass) done since this thread has been updated last time...
node-sass seems to work fine for SCSS (does not work for SASS syntax).
A node.js port of Sass might be quite nice for JS devs (who don't know Ruby).