Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
.github/ | H | 06-Feb-2021 | - | |||
internal/embeddedsass/ | H | 06-Feb-2021 | - | |||
.gitignore | H A D | 06-Feb-2021 | 275 | |||
LICENSE | H A D | 06-Feb-2021 | 1.1 KiB | |||
README.md | H A D | 06-Feb-2021 | 2 KiB | |||
codecov.yml | H A D | 06-Feb-2021 | 142 | |||
conn.go | H A D | 06-Feb-2021 | 1.8 KiB | |||
go.mod | H A D | 06-Feb-2021 | 162 | |||
go.sum | H A D | 06-Feb-2021 | 7.2 KiB | |||
options.go | H A D | 06-Feb-2021 | 5.3 KiB | |||
options_test.go | H A D | 06-Feb-2021 | 890 | |||
transpiler.go | H A D | 06-Feb-2021 | 10.7 KiB | |||
transpiler_test.go | H A D | 06-Feb-2021 | 9.8 KiB |
README.md
1[![Tests on Linux, MacOS and Windows](https://github.com/bep/godartsass/workflows/Test/badge.svg)](https://github.com/bep/godartsass/actions?query=workflow%3ATest) 2[![Go Report Card](https://goreportcard.com/badge/github.com/bep/godartsass)](https://goreportcard.com/report/github.com/bep/godartsass) 3[![codecov](https://codecov.io/gh/bep/godartsass/branch/main/graph/badge.svg?token=OWZ9RCAYWO)](https://codecov.io/gh/bep/godartsass) 4[![GoDoc](https://godoc.org/github.com/bep/godartsass?status.svg)](https://godoc.org/github.com/bep/godartsass) 5 6This is a Go API backed by the native [Dart Sass Embedded](https://github.com/sass/dart-sass-embedded) executable. 7 8The primary motivation for this project is to provide `SCSS` support to [Hugo](https://gohugo.io/). I welcome PRs with bug fixes. I will also consider adding functionality, but please raise an issue discussing it first. 9 10For LibSass bindings in Go, see [GoLibSass](https://github.com/bep/golibsass). 11 12The benchmark below compares [GoLibSass](https://github.com/bep/golibsass) with this library. This is almost twice as fast when running single-threaded, but slower when running with multiple Goroutines. We're communicating with the compiler process via stdin/stdout, which becomes the serialized bottle neck here. That may be possible to improve, but for most practical applications (including Hugo), this should not matter. 13 14```bash 15Transpile/SCSS-16 770µs ± 0% 467µs ± 1% -39.36% (p=0.029 n=4+4) 16Transpile/SCSS_Parallel-16 92.2µs ± 2% 362.5µs ± 1% +293.39% (p=0.029 n=4+4) 17 18name old alloc/op new alloc/op delta 19Transpile/SCSS-16 192B ± 0% 1268B ± 0% +560.42% (p=0.029 n=4+4) 20Transpile/SCSS_Parallel-16 192B ± 0% 1272B ± 0% +562.37% (p=0.029 n=4+4) 21 22name old allocs/op new allocs/op delta 23Transpile/SCSS-16 2.00 ± 0% 19.00 ± 0% +850.00% (p=0.029 n=4+4) 24Transpile/SCSS_Parallel-16 2.00 ± 0% 19.00 ± 0% +850.00% (p=0.029 n=4+4) 25``` 26 27