Esempio n. 1
0
func (w *World) SetUpTest(c *C) {

	w.LocalDir = c.MkDir()
	w.ServerDir = c.MkDir()

	w.Server = httptest.NewServer(http.FileServer(http.Dir(w.ServerDir)))

	w.Storage = storage.New(&storage.Config{
		BaseDir:   w.LocalDir,
		RemoteDir: "remote",
	})
}
Esempio n. 2
0
func main() {

	config.Parse()

	b := blender.New()

	b.Storage = storage.New(&storage.Config{
		BaseDir:   config.DirComponents,
		RemoteDir: config.DirRemote,
	})

	b.Blend(config.Component)

	for dst, src := range b.Files {
		if !utils.FileExists(dst) {
			utils.CopyFile(src, config.DirWww+"/"+dst)
		}
	}

	// _ = c
	// fmt.Println("HTML:\n" + *c.Html)
	// fmt.Println("CSS:\n" + *c.Css)
	// fmt.Println("JS:\n" + *c.Js)
}