• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H06-Feb-2021-

internal/embeddedsass/H06-Feb-2021-

.gitignoreH A D06-Feb-2021275

LICENSEH A D06-Feb-20211.1 KiB

README.mdH A D06-Feb-20212 KiB

codecov.ymlH A D06-Feb-2021142

conn.goH A D06-Feb-20211.8 KiB

go.modH A D06-Feb-2021162

go.sumH A D06-Feb-20217.2 KiB

options.goH A D06-Feb-20215.3 KiB

options_test.goH A D06-Feb-2021890

transpiler.goH A D06-Feb-202110.7 KiB

transpiler_test.goH A D06-Feb-20219.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