2023-03-22 13:14:50 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2023-03-22 22:45:26 +01:00
|
|
|
import json, os, sys
|
2023-03-22 13:14:50 +01:00
|
|
|
|
|
|
|
package = {}
|
|
|
|
|
2023-03-22 22:45:26 +01:00
|
|
|
argv = ' '.join(sys.argv[1:])
|
|
|
|
|
2023-03-22 13:23:59 +01:00
|
|
|
with open('package.json', 'r+', encoding='utf-8') as f:
|
2023-03-22 13:14:50 +01:00
|
|
|
package = json.loads(f.read());
|
2023-03-22 13:23:59 +01:00
|
|
|
f.seek(0);
|
|
|
|
package['source'] = 'src/resume.js';
|
|
|
|
f.truncate(0);
|
|
|
|
f.write(json.dumps(package, indent=2) + '\n');
|
2023-03-22 13:14:50 +01:00
|
|
|
|
2023-03-22 22:45:26 +01:00
|
|
|
os.system('parcel build ' + argv);
|
2023-03-22 13:14:50 +01:00
|
|
|
|
|
|
|
with open('package.json', 'w+', encoding='utf-8') as f:
|
|
|
|
package['source'] = 'src/resume.html';
|
2023-03-22 13:23:59 +01:00
|
|
|
f.write(json.dumps(package, indent=2) + '\n');
|