Add support for disabling features at build time

Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/aya/trunk@87 cec141ff-132a-4243-88a5-ce187bd62f94
This commit is contained in:
yakumo.izuru
2024-04-03 23:17:16 +00:00
parent 64da325c4b
commit efcb25e6e5
6 changed files with 30 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
//go:build !noamber
// Render .amber files into .html
package main

11
cmd/aya/amber_stub.go Normal file
View File

@@ -0,0 +1,11 @@
//go:build noamber
package main
import (
"errors"
"io"
)
func buildAmber(path string, w io.Writer, vars Vars) error {
return errors.New("Amber support was disabled on build-time")
}

View File

@@ -1,3 +1,4 @@
//go:build !nogcss
// Render .gcss files into .css
package main

11
cmd/aya/gcss_stub.go Normal file
View File

@@ -0,0 +1,11 @@
//go:build nogcss
package main
import (
"errors"
"io"
)
func buildGCSS(path string, w io.Writer) error {
return errors.New("GCSS support was disabled at build time")
}