🚧 wip
This commit is contained in:
parent
2322e28028
commit
793e576edd
1 changed files with 10 additions and 0 deletions
|
@ -2,6 +2,8 @@ module commands
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import cli
|
import cli
|
||||||
|
import log
|
||||||
|
import time
|
||||||
import toml
|
import toml
|
||||||
import regex
|
import regex
|
||||||
import markdown
|
import markdown
|
||||||
|
@ -68,6 +70,11 @@ fn pre_proc_md_to_html(contents string) ?string {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build() ? {
|
fn build() ? {
|
||||||
|
mut logger := log.Log{}
|
||||||
|
logger.set_level(log.Level.info)
|
||||||
|
logger.info()
|
||||||
|
mut sw := time.new_stopwatch()
|
||||||
|
|
||||||
dist := commands.default_dist
|
dist := commands.default_dist
|
||||||
if os.exists(dist) {
|
if os.exists(dist) {
|
||||||
os.rmdir_all(dist)?
|
os.rmdir_all(dist)?
|
||||||
|
@ -95,5 +102,8 @@ fn build() ? {
|
||||||
html_path := os.join_path(dist, filename)
|
html_path := os.join_path(dist, filename)
|
||||||
os.write_file(html_path, html)?
|
os.write_file(html_path, html)?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sw.stop()
|
||||||
|
println(sw.elapsed().seconds())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue