diff --git a/dar/dar/evidence_commands.py b/dar/dar/evidence_commands.py index 0e4e85d..f7995bd 100644 --- a/dar/dar/evidence_commands.py +++ b/dar/dar/evidence_commands.py @@ -7,11 +7,33 @@ def evidence_cli(): """Evidence command wrapper""" pass + @evidence_cli.command() -def run_sources(): - """Run Evidence sources""" +def build(): + """Generate Evidence static files""" os.chdir('reports') - subprocess.run(["npm", "run", "sources"]) + subprocess.run(["npm", "run", "build"]) + os.chdir('..') + +@evidence_cli.command() +def preview(): + """Run Evidence dev server""" + os.chdir('reports') + subprocess.run(["npm", "run", "dev"]) os.chdir('..') -# Add more Evidence commands as needed +# TODO: Add refresh command that copies compiled dbt models to Evidence source folder +@evidence_cli.command() +def refresh(): + """Copy dbt models to Evidence""" + # os.chdir('reports') + # subprocess.run(["npm", "run", "sources"]) + # os.chdir('..') + pass + +@evidence_cli.command() +def update(): + """Run Evidence sources""" + os.chdir('reports') + subprocess.run(["npm", "run", "sources"]) + os.chdir('..') \ No newline at end of file diff --git a/dar/dar/site_commands.py b/dar/dar/site_commands.py new file mode 100644 index 0000000..2340849 --- /dev/null +++ b/dar/dar/site_commands.py @@ -0,0 +1,9 @@ +# Purpose: Copy compiled static files to the site folder +import click +import subprocess +import os + +@click.group() +def site_cli(): + """Site command wrapper""" + pass \ No newline at end of file