diff --git a/build.py b/build.py new file mode 100755 index 0000000..46df6b5 --- /dev/null +++ b/build.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import json, os + +package = {} + +with open('package.json', 'tr', encoding='utf-8') as f: + package = json.loads(f.read()); + +package['source'] = 'src/resume.js'; + +with open('package.json', 'tw', encoding='utf-8') as f: + f.write(json.dumps(package)); + +os.system('parcel build'); + +with open('package.json', 'w+', encoding='utf-8') as f: + package['source'] = 'src/resume.html'; + f.write(json.dumps(package)); \ No newline at end of file diff --git a/package.json b/package.json index e24fdce..9410e73 100644 --- a/package.json +++ b/package.json @@ -1,44 +1 @@ -{ - "name": "resume", - "version": "1.0.0", - "source": "src/resume.js", - "author": "blek", - "license": "MIT", - "devDependencies": { - "assert": "^2.0.0", - "buffer": "^5.5.0", - "crypto-browserify": "^3.12.0", - "events": "^3.1.0", - "parcel": "^2.8.3", - "parcel-namer-without-hash": "^0.0.1", - "path-browserify": "^1.0.0", - "process": "^0.11.10", - "punycode": "^1.4.1", - "querystring-es3": "^0.2.1", - "stream-browserify": "^3.0.0", - "url": "^0.11.0", - "util": "^0.12.3" - }, - "dependencies": { - "@parcel/fs": "^2.8.3", - "copy-to-clipboard": "^3.3.3", - "file-saver": "^2.0.5", - "memfs": "^3.4.13", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "unionfs": "^4.4.0", - "xterm": "^5.1.0", - "xterm-for-react": "^1.0.4", - "xterm-js-shell": "^1.1.3" - }, - "scripts": { - - "prestart": "rm -f parcelrc", - "start": "parcel", - - - "prebuild": "cp .build.config .parcelrc > /dev/null 2>&1", - "build": "parcel build --no-source-maps", - "postbuild": "rm -f .parcelrc" - } -} +{"name": "resume", "version": "1.0.0", "source": "src/resume.html", "author": "blek", "license": "MIT", "devDependencies": {"assert": "^2.0.0", "buffer": "^5.5.0", "crypto-browserify": "^3.12.0", "events": "^3.1.0", "parcel": "^2.8.3", "parcel-namer-without-hash": "^0.0.1", "path-browserify": "^1.0.0", "process": "^0.11.10", "punycode": "^1.4.1", "querystring-es3": "^0.2.1", "stream-browserify": "^3.0.0", "url": "^0.11.0", "util": "^0.12.3"}, "dependencies": {"@parcel/fs": "^2.8.3", "copy-to-clipboard": "^3.3.3", "file-saver": "^2.0.5", "memfs": "^3.4.13", "react": "^18.2.0", "react-dom": "^18.2.0", "unionfs": "^4.4.0", "xterm": "^5.1.0", "xterm-for-react": "^1.0.4", "xterm-js-shell": "^1.1.3"}, "scripts": {"prestart": "rm -f parcelrc", "start": "parcel", "build": "./build.py"}} \ No newline at end of file