feat: add build command
This commit is contained in:
parent
1f1037dd01
commit
1a32cb2b42
|
|
@ -1,6 +1,16 @@
|
|||
from click import command
|
||||
from pathlib import Path
|
||||
|
||||
from click import group
|
||||
|
||||
from jwebsite.site import Site
|
||||
|
||||
|
||||
@command
|
||||
def main() -> None:
|
||||
print("Hello world")
|
||||
@group
|
||||
def main() -> None: ...
|
||||
|
||||
|
||||
@main.command
|
||||
def build() -> None:
|
||||
cwd = Path.cwd()
|
||||
with open(cwd / "site.py", encoding="utf-8") as site_config:
|
||||
exec(site_config.read(), {"site": Site(cwd)})
|
||||
|
|
|
|||
Loading…
Reference in New Issue