Skip to content

Just a command to call go-libasass to generate css to avoid constant recompilation

License

Notifications You must be signed in to change notification settings

zzwx/go-run-sass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://github.com/zzwx/go-run-sass

go-run-sass

A simple command line tool wrapper to generate css using go-libsass, which otherwise recompiles the whole library when simply imported as github.com/wellington/go-libsass. The other workarounds are explained in go-libsass README.

Installation

$ go install github.com/zzwx/go-run-sass@latest

Help

$ go-run-sass
Usage of go-run-sass:
  -help
        Print this help
  -i string
        Input SASS file
  -o string
        Output CSS file

Usage in Code

package main

import (
	"fmt"

	"github.com/zzwx/ifchanged"
)

func generateCSS() error {
	err := ifchanged.ExecuteCommand("go-run-sass", "-i", "./web/wireframe.scss", "-o", "./web/generated.css")
	if err != nil {
		fmt.Printf("Error: %s\n", err)
	} else {
		fmt.Printf("Done!\n")
	}
	return err
}

func main() {
	generateCSS()
}

About

Just a command to call go-libasass to generate css to avoid constant recompilation

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages