-
Notifications
You must be signed in to change notification settings - Fork 29
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
Simple example of using go-libsass to compile SCSS to CSS #32
Comments
@tboerger I saw your post on c6. If you're interested in compiling scss to css maybe check out go-libsass. To compile scss to css with go-libsass
There are many options for altering the compiler behavior listed here: https://github.com/wellington/go-libsass/blob/master/compiler.go#L56-L192 |
@jpillora you seemed to have a similar desire to compile scss. This example of go-libsass may be helpful for you |
go-libsass is a nice library, but I really like the principle of c6 to be a pure go implementation :) |
Sure, it's a nice idea but sass is not a simple language to implement. Which is why c6 has stalled for so long. On the other side, there's a very good implementation in C to start from. Not to say it can't be implemented in Go eventually! |
I know that it's not simple... I'm using and following sass already for years :). Maybe I can integrate go-libsass into Gogs. |
Watching libsass integrate every nook and cranny of Sass is a challenge. Though with the years of maintaining a go wrapper to the c library, I probably could have written a decent Sass parser by now. I'm a fan of the attempts to implement partial language Sass (Sass the good parts?). Sadly, these seemed to have been abandoned and it's unlikely they'll support most of the common Sass frameworks due to corner cases in Sass. Speaking of, there's a project in this repo with a working Scss/Sass lexer. I started off this project by working on a Sass lexer before fully switching to libsass https://github.com/wellington/sass/. If you're interested in working on a Sass parser, I could use help there. There's a yacc based parser, but the ambiguities in the language will prevent it from doing much. Bison's generalized grammar might get somewhere, but I think invariably Sass will require a parser built by hand. |
Feel free to reach out if you need help with gogs integration. There's also a cli tool which has examples of how to use go-libsass and adds additional functionality to Sass (like spriting). |
Sounds great, we will see how I can do it :) |
@tboerger I've begun work on a Pure Go compiler, it's nowhere near completion but can handle simple Sass compilation: https://github.com/wellington/sass |
That's really interesting! |
Should include simple examples of how to use go-libsass in custom projects
The text was updated successfully, but these errors were encountered: