chore(deps): update parcel monorepo to v2.9.1
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
24a9b7113f
commit
0ff002ce1a
|
@ -3,5 +3,5 @@ dist
|
||||||
.parcel-cache
|
.parcel-cache
|
||||||
k8s
|
k8s
|
||||||
.prettierrc.js
|
.prettierrc.js
|
||||||
.terserrc.js
|
|
||||||
commitlint.config.js
|
commitlint.config.js
|
||||||
|
postbuild.js
|
||||||
|
|
18
package.json
18
package.json
|
@ -4,16 +4,8 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"build-single": "PUBLIC_URL=https://scripts.tribalwarshelp.com parcel build",
|
"build": "parcel build ./src/*.user.ts ./src/*.quickbar.ts",
|
||||||
"build:extended-player-profile-user": "PREAMBLE=extended-player-profile yarn build-single ./src/extended-player-profile.user.ts",
|
"postbuild": "PUBLIC_URL=https://scripts.tribalwarshelp.com node postbuild.js",
|
||||||
"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:*",
|
|
||||||
"lint": "eslint src/**/*.ts"
|
"lint": "eslint src/**/*.ts"
|
||||||
},
|
},
|
||||||
"targets": {
|
"targets": {
|
||||||
|
@ -33,8 +25,8 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^17.4.4",
|
"@commitlint/cli": "^17.4.4",
|
||||||
"@commitlint/config-conventional": "^17.4.4",
|
"@commitlint/config-conventional": "^17.4.4",
|
||||||
"@parcel/validator-eslint": "^2.8.3",
|
"@parcel/validator-eslint": "^2.9.1",
|
||||||
"@parcel/validator-typescript": "^2.8.3",
|
"@parcel/validator-typescript": "^2.9.1",
|
||||||
"@types/jquery": "^3.5.14",
|
"@types/jquery": "^3.5.14",
|
||||||
"@types/lodash": "^4.14.191",
|
"@types/lodash": "^4.14.191",
|
||||||
"@types/node": "^18.11.17",
|
"@types/node": "^18.11.17",
|
||||||
|
@ -45,7 +37,7 @@
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"parcel": "^2.8.3",
|
"parcel": "^2.9.1",
|
||||||
"prettier": "^2.8.3",
|
"prettier": "^2.8.3",
|
||||||
"typescript": "^5.0.0"
|
"typescript": "^5.0.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -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==
|
'extended-player-profile': `// ==UserScript==
|
||||||
// @name Extended player profile
|
// @name Extended player profile
|
||||||
// @version 1.1.3
|
// @version 1.1.3
|
||||||
|
@ -49,11 +55,12 @@ const preambles = {
|
||||||
// ==/UserScript==`,
|
// ==/UserScript==`,
|
||||||
};
|
};
|
||||||
|
|
||||||
const preamble = preambles[process.env.PREAMBLE];
|
Object.entries(metadata).forEach(([name, m]) => {
|
||||||
module.exports = preamble
|
const p = path.join('.', DIST_DIR, `${name}${FILE_SUFFIX}`);
|
||||||
? {
|
const data = fs.readFileSync(p);
|
||||||
output: {
|
const fd = fs.openSync(p, 'w+');
|
||||||
preamble: preamble,
|
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);
|
||||||
|
});
|
Loading…
Reference in New Issue