workaround to fix bundle same name error

This commit is contained in:
b1ek 2023-03-22 22:14:50 +10:00
parent ec0d716bde
commit fab57f9122
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 20 additions and 44 deletions

19
build.py Executable file
View File

@ -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));

View File

@ -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"}}