chore(deps): update parcel monorepo to v2.9.1
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Dawid Wysokiński 2023-06-02 08:05:32 +02:00
parent 24a9b7113f
commit 0ff002ce1a
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
4 changed files with 611 additions and 537 deletions

View File

@ -3,5 +3,5 @@ dist
.parcel-cache
k8s
.prettierrc.js
.terserrc.js
commitlint.config.js
postbuild.js

View File

@ -4,16 +4,8 @@
"license": "MIT",
"scripts": {
"prepare": "husky install",
"build-single": "PUBLIC_URL=https://scripts.tribalwarshelp.com parcel build",
"build:extended-player-profile-user": "PREAMBLE=extended-player-profile yarn build-single ./src/extended-player-profile.user.ts",
"build:extended-player-profile-quickbar": "yarn build-single ./src/extended-player-profile.quickbar.ts",
"build:extended-map-popup-user": "PREAMBLE=extended-map-popup yarn build-single ./src/extended-map-popup.user.ts",
"build:extended-map-popup-quickbar": "yarn build-single ./src/extended-map-popup.quickbar.ts",
"build:extended-village-profile-user": "PREAMBLE=extended-village-profile yarn build-single ./src/extended-village-profile.user.ts",
"build:extended-village-profile-quickbar": "yarn build-single ./src/extended-village-profile.quickbar.ts",
"build:extended-tribe-profile-user": "PREAMBLE=extended-tribe-profile yarn build-single ./src/extended-tribe-profile.user.ts",
"build:extended-tribe-profile-quickbar": "yarn build-single ./src/extended-tribe-profile.quickbar.ts",
"build": "npm-run-all build:*",
"build": "parcel build ./src/*.user.ts ./src/*.quickbar.ts",
"postbuild": "PUBLIC_URL=https://scripts.tribalwarshelp.com node postbuild.js",
"lint": "eslint src/**/*.ts"
},
"targets": {
@ -33,8 +25,8 @@
"devDependencies": {
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@parcel/validator-eslint": "^2.8.3",
"@parcel/validator-typescript": "^2.8.3",
"@parcel/validator-eslint": "^2.9.1",
"@parcel/validator-typescript": "^2.9.1",
"@types/jquery": "^3.5.14",
"@types/lodash": "^4.14.191",
"@types/node": "^18.11.17",
@ -45,7 +37,7 @@
"eslint-config-prettier": "^8.6.0",
"husky": "^8.0.3",
"npm-run-all": "^4.1.5",
"parcel": "^2.8.3",
"parcel": "^2.9.1",
"prettier": "^2.8.3",
"typescript": "^5.0.0"
},

View File

@ -1,4 +1,10 @@
const preambles = {
const fs = require('fs');
const path = require('path');
const FILE_SUFFIX = '.user.js';
const DIST_DIR = 'dist';
const metadata = {
'extended-player-profile': `// ==UserScript==
// @name Extended player profile
// @version 1.1.3
@ -49,11 +55,12 @@ const preambles = {
// ==/UserScript==`,
};
const preamble = preambles[process.env.PREAMBLE];
module.exports = preamble
? {
output: {
preamble: preamble,
},
}
: {};
Object.entries(metadata).forEach(([name, m]) => {
const p = path.join('.', DIST_DIR, `${name}${FILE_SUFFIX}`);
const data = fs.readFileSync(p);
const fd = fs.openSync(p, 'w+');
const insert = Buffer.from(`${m}\n`);
fs.writeSync(fd, insert, 0, insert.length, 0);
fs.writeSync(fd, data, 0, data.length, insert.length);
fs.closeSync(fd);
});

1103
yarn.lock

File diff suppressed because it is too large Load Diff