Skip to content

pascalj/sass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gosass - A Go wrapper for libsass

Gosass is a wrapper for libsass that is written in Go. It is currently not considered stable.

Installation

Install libsass and execute:

go get github.com/pascalj/sass

Usage

Gosass comes with a thin wrapper for the C API provided by libsass. The Usage is straigt forward:

package main
import "github.com/pascalj/sass"

func main() {
  filePath := "style.scss"
  inDirectoryPath := "./scss/"
  outDirectoryPath := "./css/"
  opts := sass.NewOptions()
  output, err := sass.Compile("body { background: #fff; }", opts)
  output, err = sass.CompileFile(filePath, opts)
  err = sass.CompileFolder(inDirectoryPath, outDirectoryPath, opts)
}

Command line tool

Installation

go get github.com/pascalj/sass/gosass

Usage

echo 'body f{ background: #fff }\n' | gosass -s -t compressed -o ./test.css

For all options see gosass -h.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License: BSD

Copyright (c) 2014, Pascal Jungblut All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

libsass wrapper for the Go programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages