-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to use Libsass 2.0 #55
Comments
See #53, waiting on node-sass npm update |
Updating to libsass 2.0. Closes dlmanning#53, dlmanning#55
So theoretically using node-sass 0.9 we should be able to compile .sass files now. Will that "just work" automatically? gulp.task('sass', function () {
return gulp.src('sass/file.sass')
.pipe(sass())
.pipe(gulp.dest('css'));
}); ? |
Using a setup like that and the change I referenced in #56 I get So it doesn't 'just work' by bumping the npm version of node-sass as far as I'm aware, however I don't really know what else is going on behind the scenes so I can't comment on that. |
I'm seeing the same thing. node-sass seem to be implying it should work "automagically" Which made me think it would work auto for gulp-sass as well as it is a wrapper around node-sass. My heart aches for super fast .sass compilation with libsass via gulp. |
It works perfectly with https://github.com/andrew/node-sass-example (just by bumping to 0.9). Not as simple for upgrading gulp-sass then. Edit: NVM, wasn't paying attention. |
So did you have $font-stack: Helvetica, sans-serif
$primary-color: #333
body
font: 100% $font-stack
color: $primary-color in a I got node-sass to process a .sass file with the following. And that worked. So node-sass can def do it (or at least can def do a contrived example). var sass = require('node-sass');
sass.renderFile({
file: 'static_source/sass/test.sass',
success: function (e) {
console.log("done");
},
outFile: 'done.css'
}); |
Ooops! My bad, it was using the old code from the scss file before I renamed it. Didn't pay attention to what I was copying. Glad you got it working though! |
I've "documented" the behaviour on sass/libsass#16 (comment). Libsass can only recognise and convert indented sass if it knows it by file extension. If you need to pass it by string, you have to convert it via sass2scss yourself. But I guess this function would need to be exposed by the node-sass binding. I implemented this for the Perl Bindings at mgreter/perl-libsass@7b5bb4f. If you find issues specific to sass2scss please post them to https://github.com/mgreter/sass2scss. |
I'm happy to have it with my curly braces everywhere! Perhaps it's of use for @chrisdl? |
Oh yeah, If I can get it working with indented syntax I'm gonna be a happy camper. I'll try some stuff and keep you guys updated. But mostly I am wondering why it seems to work with node-sass but not with gulp-sass which should just sit right on top of node-sass? |
Done: 6e88945 |
After updating to 0.7.2 I still cannot compile even a super simple .sass file with gulp-sass. has anyone gotten it working? |
Agreed. I am still unable to compile the indented syntax with the latest version. |
With default settings compiling sass files doesn't work. However there is a workaround. If you pass Without the Now, I think it's safe to remove this condition and use the same |
with sourceComments I can now compile it. I put a super simple proof of concept here https://github.com/chrisdl/gulp-libsass-example |
@idflood's workaround is a great help. If you want to compile sass-style syntax! |
@chrisdl I used your example as an answer for my stackoverfow question: http://stackoverflow.com/questions/24397679/indented-sass-syntax-not-working-with-node-sass-and-gulp-sass/25211459#25211459 |
@idflood @chrisdl @cspiegl @jsheffers Just FYI, doing that will result in any changes to the file content from earlier in the gulp pipeline (e.g. earlier plugins) being discarded. See #158. |
Libsass has just updated to 2.0 and it would be awesome if the gulp-sass could be updated to use this.
The text was updated successfully, but these errors were encountered: