mirror of
https://github.com/danog/gojekyll.git
synced 2024-11-27 07:44:40 +01:00
Lint; add subcommand usage
This commit is contained in:
parent
0dca5cf97c
commit
c466cc6c9c
@ -86,6 +86,8 @@ The gopher image in the test directory is from [Wikimedia Commons](https://commo
|
||||
|
||||
[Jekyll](https://jekyllrb.com), of course.
|
||||
|
||||
This project is a clean-room implementation of Jekyll, based solely on Jekyll's documentation and testing a few sites.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
3
build.go
3
build.go
@ -39,9 +39,6 @@ func (s *Site) Clean(options BuildOptions) error {
|
||||
if err := filepath.Walk(s.Destination, removeFiles); err != nil {
|
||||
return err
|
||||
}
|
||||
if options.DryRun {
|
||||
return nil
|
||||
}
|
||||
return helpers.RemoveEmptyDirectories(s.Destination)
|
||||
}
|
||||
|
||||
|
@ -96,13 +96,13 @@ func main() {
|
||||
},
|
||||
Action: withSite(benchmarkCommand),
|
||||
}, {
|
||||
Name: "data",
|
||||
Usage: "Print a file or URL path's variables",
|
||||
Action: withSite(dataCommand),
|
||||
Name: "data",
|
||||
Usage: "Print a file or URL path's variables",
|
||||
Action: withSite(dataCommand),
|
||||
},
|
||||
{
|
||||
Name: "routes",
|
||||
Usage: "Display site permalinks and associated files",
|
||||
Name: "routes",
|
||||
Usage: "Display site permalinks and associated files",
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "dynamic",
|
||||
@ -113,7 +113,7 @@ func main() {
|
||||
},
|
||||
{
|
||||
Name: "render",
|
||||
Usage: "Render a file or URL path",
|
||||
Usage: "Render a file or URL path",
|
||||
Action: withSite(renderCommand),
|
||||
},
|
||||
}
|
||||
@ -123,7 +123,9 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
pprof.StartCPUProfile(f)
|
||||
if err = pprof.StartCPUProfile(f); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer pprof.StopCPUProfile()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user