wellington / go-libsass

Go wrapper for libsass, the only Sass 3.5 compiler for Go
http://godoc.org/github.com/wellington/go-libsass
Apache License 2.0
205 stars 28 forks source link

libsass

Circle CI Build status

The only Sass compliant Go library! go-libsass is a wrapper to the sass/libsass project.

To build, setup Go

go build

To test

go test

Basic example more examples found in examples

buf := bytes.NewBufferString("div { p { color: red; } }")
if err != nil {
    log.Fatal(err)
}
comp, err := libsass.New(os.Stdout, buf)
if err != nil {
    log.Fatal(err)
}

if err := comp.Run(); err != nil {
    log.Fatal(err)
}

Output

div p {
  color: red; }

Updating libsass

cd libsass-src; git fetch; git checkout vX.X.X
git commit -m "updated libsass to vX.X.X"
make update-libsass
# iterate on includes and code changes until tests pass

FAQ