Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aimuz/go-sass
The reference implementation of Sass, written in Golang.
https://github.com/aimuz/go-sass
css golang sass sass-loader scss scss-styles
Last synced: 1 day ago
JSON representation
The reference implementation of Sass, written in Golang.
- Host: GitHub
- URL: https://github.com/aimuz/go-sass
- Owner: aimuz
- License: mit
- Created: 2021-06-08T09:13:26.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-23T10:11:36.000Z (about 3 years ago)
- Last Synced: 2024-06-20T17:53:10.955Z (5 months ago)
- Topics: css, golang, sass, sass-loader, scss, scss-styles
- Language: Go
- Homepage:
- Size: 89.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# go-sass (No use, in progress)
[![License](https://img.shields.io/github/license/aimuz/go-sass)](LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/aimuz/go-sass)](https://goreportcard.com/report/github.com/aimuz/go-sass)
[![GoDoc](https://pkg.go.dev/badge/github.com/aimuz/go-sass?status.svg)](https://pkg.go.dev/github.com/aimuz/go-sass?tab=doc)A Golang implementation of Sass.
## Why
This is a project for learning `AST` syntax analysis tree. It is not recommended to use it in production for the time
being. The project is not stable enough## Using Golang Sass
### Form go get
```bash
go install github.com/aimuz/go-sass/cmd/sass@latest
```If you are a golang user, you can install it globally through go get, which only provides cli usage
```bash
go get github.com/aimuz/go-sass/sass
```If you want to import the library, just `go get` in your project
```go
package mainimport (
"fmt"
"github.com/aimuz/go-sass/sass"
)func main() {
fmt.Println(sass.Compile("input.scss", nil))
fmt.Println(sass.CompileString("h1 {font-size: 40px}", nil))
}
```### From npm
We compile the core library into wasm, and then provide the NTP package through typescript wrapper
```bash
npm -i go-sass
```Provides the same API as dart sass
### From Homebrew (OS X)
```bash
brew install go-sass
```## TODO
- [ ] CSS Parser
- [ ] SCSS Parser
- [ ] SASS Parser
- [ ] WASM - NPM Package
- [ ] tinygo
- [ ] Built in functions
- [ ] xxx
- [ ] ...
- [ ] Compress
- [ ] Minimum color value## Acknowledgments
- Thanks,[csstree](https://github.com/csstree/csstree) Provide ast reference