From 0452f4dafdabae460ecee82c5ada5daeea9cbd25 Mon Sep 17 00:00:00 2001 From: b1ek Date: Thu, 23 Mar 2023 07:45:26 +1000 Subject: [PATCH] pass args to build command --- build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index abf8d53..427be9a 100755 --- a/build.py +++ b/build.py @@ -1,9 +1,11 @@ #!/usr/bin/env python3 -import json, os +import json, os, sys package = {} +argv = ' '.join(sys.argv[1:]) + with open('package.json', 'r+', encoding='utf-8') as f: package = json.loads(f.read()); f.seek(0); @@ -11,7 +13,7 @@ with open('package.json', 'r+', encoding='utf-8') as f: f.truncate(0); f.write(json.dumps(package, indent=2) + '\n'); -os.system('parcel build'); +os.system('parcel build ' + argv); with open('package.json', 'w+', encoding='utf-8') as f: package['source'] = 'src/resume.html';