pass args to build command
This commit is contained in:
parent
7277b2a158
commit
0452f4dafd
6
build.py
6
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';
|
||||
|
|
Loading…
Reference in New Issue