diff options
author | Pacien | 2013-09-21 13:06:22 +0200 |
---|---|---|
committer | Pacien | 2013-09-21 13:06:22 +0200 |
commit | a20a6a41d13d062fce6b8269ceaca336574a43c4 (patch) | |
tree | f1f23c947d358ec3cde7e7bd7e6eed6b0a45c8a9 | |
parent | f8c9b52222ce183676d26f3e953b57572b7d4d3b (diff) | |
download | foldaweb-a20a6a41d13d062fce6b8269ceaca336574a43c4.tar.gz |
Better trace
-rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -103,7 +103,6 @@ func (g *generator) outputPath(filePath string) string { | |||
103 | finalFilePath = path.Join(finalFilePath, element) | 103 | finalFilePath = path.Join(finalFilePath, element) |
104 | } | 104 | } |
105 | } | 105 | } |
106 | fmt.Println(finalFilePath) | ||
107 | return path.Join(g.outputDir, g.sanitizePath(finalFilePath)) | 106 | return path.Join(g.outputDir, g.sanitizePath(finalFilePath)) |
108 | } | 107 | } |
109 | 108 | ||
@@ -118,6 +117,7 @@ func (g *generator) isFileParsable(fileName string) bool { | |||
118 | 117 | ||
119 | func (g *generator) copyFile(filePath string) { | 118 | func (g *generator) copyFile(filePath string) { |
120 | defer g.tasks.Done() | 119 | defer g.tasks.Done() |
120 | fmt.Println("Copying: " + filePath) | ||
121 | err := fcmd.Cp(g.sourcePath(filePath), g.outputPath(filePath)) | 121 | err := fcmd.Cp(g.sourcePath(filePath), g.outputPath(filePath)) |
122 | if err != nil { | 122 | if err != nil { |
123 | fmt.Println(err) | 123 | fmt.Println(err) |
@@ -203,8 +203,9 @@ func (g *generator) generate(page page) { | |||
203 | // Generate the page at the current directory | 203 | // Generate the page at the current directory |
204 | _, currentDir := path.Split(currentDirPath) | 204 | _, currentDir := path.Split(currentDirPath) |
205 | if containsParsableFiles && !strings.HasPrefix(currentDir, g.skipPrefix) { | 205 | if containsParsableFiles && !strings.HasPrefix(currentDir, g.skipPrefix) { |
206 | page.body = []byte(mustache.Render(string(g.mergeParts(page.parts)), g.contextualize(page))) | 206 | fmt.Println("Rendering: " + currentDirPath) |
207 | 207 | ||
208 | page.body = []byte(mustache.Render(string(g.mergeParts(page.parts)), g.contextualize(page))) | ||
208 | err := fcmd.WriteFile(g.outputPath(path.Join(page.dirPath, g.saveAs)), page.body) | 209 | err := fcmd.WriteFile(g.outputPath(path.Join(page.dirPath, g.saveAs)), page.body) |
209 | if err != nil { | 210 | if err != nil { |
210 | fmt.Println(err) | 211 | fmt.Println(err) |