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

Built-in css pre-compilers in riot compiler? #1195

Closed
emilebosch opened this Issue Sep 8, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@emilebosch

emilebosch commented Sep 8, 2015

Hi i was wondering if there some way i can use SASS in the riot tag compiler? The tag

<style type='sass'>

Tells me i can't use it unfortnately

@nippur72

This comment has been minimized.

Show comment
Hide comment
@nippur72

nippur72 Sep 8, 2015

Contributor

I've never tried it, but I think you can setup a custom CSS parser that renders SASS (with the help of sass.js):

riot.parsers.css.myCssParser = function(tagName, css) {
  return Sass.compile(css);
}
Contributor

nippur72 commented Sep 8, 2015

I've never tried it, but I think you can setup a custom CSS parser that renders SASS (with the help of sass.js):

riot.parsers.css.myCssParser = function(tagName, css) {
  return Sass.compile(css);
}
@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Sep 8, 2015

Member

In the next riot release this will be easily possible, for now you can just use:

var riot = require('riot')
riot.parsers.css.sass = function(tagName, css) {
  return Sass.compile(css);
}
var myTag = require('my-tag.tag')
Member

GianlucaGuarini commented Sep 8, 2015

In the next riot release this will be easily possible, for now you can just use:

var riot = require('riot')
riot.parsers.css.sass = function(tagName, css) {
  return Sass.compile(css);
}
var myTag = require('my-tag.tag')
@emilebosch

This comment has been minimized.

Show comment
Hide comment
@emilebosch

emilebosch commented Sep 9, 2015

Thanks!

@emilebosch

This comment has been minimized.

Show comment
Hide comment
@emilebosch

emilebosch Sep 9, 2015

Any idea on when the next release will be?

emilebosch commented Sep 9, 2015

Any idea on when the next release will be?

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Sep 9, 2015

Member

You are welcome @emilebosch keep an eye on this page https://github.com/riot/riot/milestones

Member

GianlucaGuarini commented Sep 9, 2015

You are welcome @emilebosch keep an eye on this page https://github.com/riot/riot/milestones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment