1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-05 09:50:11 +00:00
jfa-go/scss/get_node_deps.py
Harvey Tindall 62621dabb9 CLI flags, start setting up goreleaser, add build scripts
Copied and fixed the build scripts from jf-accounts, added them to the
.goreleaser.yml. Also:
data directory now stored in user's config folder
Handle timeouts in jfapi
Maybe more i forgot about.
2020-08-01 21:20:02 +01:00

18 lines
441 B
Python

#!/usr/bin/env python3
import subprocess
from pathlib import Path
def runcmd(cmd):
proc = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
return proc.communicate()
print('Installing npm packages')
root_path = Path(__file__).parents[1]
runcmd(f'npm install --prefix {root_path}')
if (root_path / 'node_modules' / 'cleancss').exists():
print(f'Installed successfully in {str((root_path / "node_modules").resolve())}.')