Go API backed by the native Dart Sass Embedded executable.

Tests on Linux, MacOS and Windows Go Report Card codecov GoDoc

This is a Go API backed by the native Dart Sass Embedded executable.

The primary motivation for this project is to provide SCSS support to Hugo. I welcome PRs with bug fixes. I will also consider adding functionality, but please raise an issue discussing it first.

For LibSass bindings in Go, see GoLibSass.

The benchmark below compares 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.

Transpile/SCSS-16              770µs ± 0%     467µs ± 1%   -39.36%  (p=0.029 n=4+4)
Transpile/SCSS_Parallel-16    92.2µs ± 2%   362.5µs ± 1%  +293.39%  (p=0.029 n=4+4)

name                        old alloc/op   new alloc/op   delta
Transpile/SCSS-16               192B ± 0%     1268B ± 0%  +560.42%  (p=0.029 n=4+4)
Transpile/SCSS_Parallel-16      192B ± 0%     1272B ± 0%  +562.37%  (p=0.029 n=4+4)

name                        old allocs/op  new allocs/op  delta
Transpile/SCSS-16               2.00 ± 0%     19.00 ± 0%  +850.00%  (p=0.029 n=4+4)
Transpile/SCSS_Parallel-16      2.00 ± 0%     19.00 ± 0%  +850.00%  (p=0.029 n=4+4)
Owner
Bjørn Erik Pedersen
Software Developer and Saxophonist from Norway • Creator of @gohugoio
Bjørn Erik Pedersen
Similar Resources

this is an api that execute your deno code and send you the output

this a simple api that execute your deno code and send you the output, has not limit per request example request: in deno: const rawResponse = await f

Dec 23, 2022

Go scripts for finding an API key / some keywords in repository

Go scripts for finding an API key / some keywords in repository

Git-Secret Go scripts for finding an API key / some keywords in repository Update V1.0 🚀 Added some API Key checker Screenshoot 📷 How to Install go

Dec 30, 2022

🚀 Use Lanyard API easily in your Go app!

🚀 Go Lanyard Use Lanyard API easily in your Go app! 📦 Installation Initialize your project (go mod init example.com/example) Add package (go get git

Mar 11, 2022

A simple API for computing diffs of your documents over the time built on a scalable technology stack.

Diffme API WIP - this is an API to compute diffs between documents. It serves as a way to easily create audit logs for documents in your system, think

Sep 8, 2021

An Api for Task by Appointy made using go.

AppointyTask API How to Compile Export All the required environment variables. MONGO_URI = Database URI PORT = Port to run the server on DATABA

Oct 10, 2021

Instagram Backend API Using GO

Instagram Backend API Using GO

InstaCloneGo ⚡ Instagram Backend API Using GO Setup ❄️ go run server.go API END POINTS CREATE USERS :http://localhost:8001/users GET A USER USING ID

Oct 10, 2021

An implement of CNI depending on neutron API

An implement of CNI depending on neutron API

Dec 27, 2021

A lib of golang which contains many funny api;

A lib of golang which contains many funny api; I created it cause I could not find these more-effient apis from other repo.

Oct 27, 2021

Rest Api Generator for Golang Programming Language

Rest Api Generator for Golang Programming Language

Nov 29, 2021
Comments
  • Refactor API to use self-referential functions for options

    Refactor API to use self-referential functions for options

    You didn't ask for this, but I thought this package was small enough to be a good test case for trying a different approach to API design. To get a feel for how the API would work for the end user, see transpiler_test.go:133. The go doc -all output is helpful too.

    It's an interesting approach, so I thought I'd share the results. If you don't like it, feel free to close and move on. You won't hurt my feelings. 😄

    Commit message:

    Inspired by Rob Pike and Dave Cheney, refactor the transpiler options and execute args to use self-referential functions.

    For reference:

    https://commandcenter.blogspot.com/2014/01/self-referential-functions-and-design.html https://dave.cheney.net/2016/11/13/do-not-fear-first-class-functions

  • Support Hugo's relative imports in its union file system

    Support Hugo's relative imports in its union file system

    The request for adding the missing file info is currently rejected, so it does not look promising:

    https://github.com/sass/embedded-protocol/issues/40

  • Allow user defined functions capability

    Allow user defined functions capability

    Allow hugo define hugo-specific built-in sass functions

    Improve development experience (simplify reference resource files)

    Replaced by https://github.com/bep/golibsass/issues/7

    https://github.com/bep/godartsass/blob/9f9f1c1aeb19fa45147bf1ca123e73a8dec85e66/internal/embeddedsass/embedded_sass.proto#L537-L568

    https://github.com/bep/godartsass/blob/9f9f1c1aeb19fa45147bf1ca123e73a8dec85e66/internal/embeddedsass/embedded_sass.proto#L220-L239

Related tags
a decision & trigger framework backed by Google's Common Expression Language used in graphikDB

a decision & trigger framework backed by Google's Common Expression Language used in graphikDB

Nov 15, 2022
squirrelbyte is a "proof of concept" document / search server backed by sqlite.

??️ squirrelbyte is a "proof of concept" document / search server backed by sqlite.

May 20, 2022
Helper library for full uint64 randomness, pool backed for efficient concurrency

fastrand64-go Helper library for full uint64 randomness, pool backed for efficient concurrency Inspired by https://github.com/valyala/fastrand which i

Dec 5, 2021
流媒体NetFlix解锁检测脚本 / A script used to determine whether your network can watch native Netflix movies or not
流媒体NetFlix解锁检测脚本 / A script used to determine whether your network can watch native Netflix movies or not

netflix-verify 流媒体NetFlix解锁检测脚本,使用Go语言编写 在VPS网络正常的情况下,哪怕是双栈网络也可在几秒内快速完成IPv4/IPv6的解锁判断 鸣谢 感谢 @CoiaPrant 指出对于地域检测更简便的方法 感谢 @XmJwit 解决了IPV6 Only VPS无法下载脚

Dec 29, 2022
Go library for decoding generic map values into native Go structures and vice versa.

mapstructure mapstructure is a Go library for decoding generic map values to structures and vice versa, while providing helpful error handling. This l

Dec 28, 2022
Goridge is high performance PHP-to-Golang codec library which works over native PHP sockets and Golang net/rpc package.
Goridge is high performance PHP-to-Golang codec library which works over native PHP sockets and Golang net/rpc package.

Goridge is high performance PHP-to-Golang codec library which works over native PHP sockets and Golang net/rpc package. The library allows you to call Go service methods from PHP with a minimal footprint, structures and []byte support.

Dec 28, 2022
A pluggable backend API that enforces the Event Sourcing Pattern for persisting & broadcasting application state changes
A pluggable backend API that enforces the Event Sourcing Pattern for persisting & broadcasting application state changes

A pluggable "Application State Gateway" that enforces the Event Sourcing Pattern for securely persisting & broadcasting application state ch

Nov 1, 2022
The easiest way to make API documents for GraphQL

Document Generator for GraphQL gqldoc is now alpha gqldoc is command line tool to generate documents from GraphQL schema or your GraphQL endpoint. the

Dec 20, 2022
reflect api without runtime reflect.Value cost

reflect2 reflect api that avoids runtime reflect.Value cost reflect get/set interface{}, with type checking reflect get/set unsafe.Pointer, without ty

Jan 4, 2023
Cross-platform Bluetooth API for Go and TinyGo.
Cross-platform Bluetooth API for Go and TinyGo.

Go Bluetooth is a cross-platform package for using Bluetooth Low Energy hardware from the Go programming language.

Jan 6, 2023