refactor: rename files
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Dawid Wysokiński 2023-01-29 09:43:27 +01:00
parent a7c07111ef
commit 965b79a430
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
7 changed files with 24 additions and 17 deletions

View File

@ -1,17 +1,16 @@
const preambles = { const preambles = {
'extended-player-profile': `// ==UserScript== 'extended-player-profile': `// ==UserScript==
// @name Extended player profile // @name Extended player profile
// @version 1.0.1 // @version 1.0.2
// @description Adds additional info and actions to a player's profile. // @description Adds additional info and actions to a player's profile.
// @author Dawid Wysokiński - Kichiyaki - contact@dwysokinski.me // @author Dawid Wysokiński - Kichiyaki - contact@dwysokinski.me
// @match https://*/game.php?*screen=info_player* // @match https://*/game.php?*screen=info_player*
// @downloadURL ${process.env.PUBLIC_URL}/userscripts/extendedPlayerProfile.js // @downloadURL ${process.env.PUBLIC_URL}/extended-player-profile.user.js
// @updateURL ${process.env.PUBLIC_URL}/userscripts/extendedPlayerProfile.js // @updateURL ${process.env.PUBLIC_URL}/extended-player-profile.user.js
// @icon https://www.google.com/s2/favicons?domain=plemiona.pl // @icon https://www.google.com/s2/favicons?domain=plemiona.pl
// @grant none // @grant none
// @run-at document-end // @run-at document-end
// ==/UserScript== // ==/UserScript==`,
`,
}; };
const preamble = preambles[process.env.PREAMBLE]; const preamble = preambles[process.env.PREAMBLE];

View File

@ -3,6 +3,7 @@
file_server file_server
header -Server header -Server
header Cache-Control max-age=3600 header Cache-Control max-age=3600
header /quickbar/*.js Content-type "text/javascript; charset=UTF-8" header *.js Content-type "text/javascript; charset=UTF-8"
header /userscripts/*.js Content-type "text/javascript; charset=UTF-8" header /*.js Content-type "text/javascript; charset=UTF-8"
redir /userscripts/extendedPlayerProfile.js /extended-player-profile.user.js permanent
} }

View File

@ -3,14 +3,19 @@
"version": "0.1.0", "version": "0.1.0",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build-userscript": "PUBLIC_URL=https://scripts.tribalwarshelp.com parcel build --dist-dir dist/userscripts", "build-single": "PUBLIC_URL=https://scripts.tribalwarshelp.com parcel build",
"build-quickbar": "PUBLIC_URL=https://scripts.tribalwarshelp.com parcel build --dist-dir dist/quickbar", "build:userscript:extended-player-profile": "PREAMBLE=extended-player-profile yarn build-single ./src/extended-player-profile.user.ts",
"build:userscript:extended-player-profile": "PREAMBLE=extended-player-profile yarn build-userscript src/extendedPlayerProfile.ts", "build:quickbar:extended-player-profile": "yarn build-single ./src/extended-player-profile.quickbar.ts",
"build:quickbar:extended-player-profile": "yarn build-quickbar src/extendedPlayerProfile.ts",
"build:userscript": "npm-run-all build:userscript:*", "build:userscript": "npm-run-all build:userscript:*",
"build:quickbar": "npm-run-all build:quickbar:*", "build:quickbar": "npm-run-all build:quickbar:*",
"build": "npm-run-all build:*" "build": "npm-run-all build:*"
}, },
"targets": {
"default": {
"distDir": "./dist",
"sourceMap": false
}
},
"author": { "author": {
"name": "Dawid Wysokiński", "name": "Dawid Wysokiński",
"email": "contact@dwysokinski.me", "email": "contact@dwysokinski.me",
@ -26,7 +31,7 @@
"buffer": "^5.5.0", "buffer": "^5.5.0",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"parcel": "^2.8.1", "parcel": "^2.8.1",
"prettier": "^2.8.1", "prettier": "^2.8.3",
"typescript": "^4.9.4" "typescript": "^4.9.4"
}, },
"dependencies": { "dependencies": {

View File

@ -0,0 +1,2 @@
// Parcel doesn't have an option to rename output files
import './extended-player-profile.user';

View File

@ -1,7 +1,7 @@
// Extended player profile // Extended player profile
import { Player, PlayerSnapshot, TWHelpClient } from './lib/twhelp'; import { Player, PlayerSnapshot, TWHelpClient } from './lib/twhelp';
import { DialogTable } from './common/DialogTable'; import { DialogTable } from './common/dialog-table';
import { InADayClient } from './lib/tw'; import { InADayClient } from './lib/tw';
import { createTranslationFunc } from './utils'; import { createTranslationFunc } from './utils';

View File

@ -1743,10 +1743,10 @@ posthtml@^0.16.4, posthtml@^0.16.5:
posthtml-parser "^0.11.0" posthtml-parser "^0.11.0"
posthtml-render "^3.0.0" posthtml-render "^3.0.0"
prettier@^2.8.1: prettier@^2.8.3:
version "2.8.1" version "2.8.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632"
integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg== integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==
proxy-from-env@^1.1.0: proxy-from-env@^1.1.0:
version "1.1.0" version "1.1.0"