Documentation ¶
Index ¶
- Variables
- func CompileJs(c *Config, src, dst string) error
- func CompileJsx(c *Config, src, dst string) error
- func CompileScss(c *Config, src, dst string) error
- func CompileTsc(c *Config, src, dst string) error
- func Root() string
- func ServeContent(w ResponseWriter, r *http.Request, cfg *Config, d ...http.Dir)
- func ServeContentModificationTime(w http.ResponseWriter, r *http.Request, t time.Time) bool
- type Config
- type Handler
- type HostRedirectResponder
- type Optimization
- type Responder
- type Response
- type ResponseWriter
- type Router
- type Trie
Constants ¶
This section is empty.
Variables ¶
View Source
var PathToClosureCompiler = "closure-compiler"
PathToClosureCompiler ...
View Source
var PathToJsx = "jsx"
PathToJsx ...
View Source
var PathToSass = "sass"
PathToSass ...
View Source
var PathToTsc = "tsc"
PathToTsc ...
Functions ¶
func CompileJsx ¶
func CompileScss ¶
func CompileTsc ¶
func ServeContent ¶
ServeContent ...
func ServeContentModificationTime ¶
ServeContentModificationTime returns true if content should be delivered
Types ¶
type Config ¶
type Config struct { Level Optimization JsxIncludes []string JsxExterns []string ScssIncludes []string }
Config ...
type HostRedirectResponder ¶
type HostRedirectResponder string
HostRedirectResponder ...
func (HostRedirectResponder) ServePork ¶
func (h HostRedirectResponder) ServePork(w ResponseWriter, r *http.Request)
ServePork ...
type Optimization ¶
type Optimization int
Optimization ...
const ( // None ... None Optimization = iota // Basic ... Basic // Advanced ... Advanced )
type Responder ¶
type Responder interface {
ServePork(ResponseWriter, *http.Request)
}
Responder ...
func ErrorFileResponder ¶
ErrorFileResponder ...
func ResponderFunc ¶
func ResponderFunc(f func(ResponseWriter, *http.Request)) Responder
ResponderFunc ...
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response ...
func FindContent ¶
FindContent ...
type ResponseWriter ¶
type ResponseWriter interface { http.ResponseWriter ServeNotFound() ServedFromPrefix() string EnableCompression() }
ResponseWriter ...
Click to show internal directories.
Click to hide internal directories.