Skip to content

vinh84/go-libsass

 
 

Repository files navigation

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; }

FAQ

  • Compiling go-libsass is very slow, what can be done?

    Go-libsass compiles C/C++ libsass on every build. You can install the package and speed up building go install github.com/wellington/go-libsass. Alternatively, it's possible to link against system libsass and forego C compiling with go build -tags dev.

  • How do I cross compile?

    Since this package uses C bindings, you will need gcc for the target platform. For windows see, wellington#37

About

Go wrapper for libsass, the only Sass 3.3 compiler for Go

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 90.1%
  • Go 7.5%
  • C 2.3%
  • Other 0.1%