refactor: rename files
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
This commit is contained in:
parent
a7c07111ef
commit
965b79a430
|
@ -1,17 +1,16 @@
|
|||
const preambles = {
|
||||
'extended-player-profile': `// ==UserScript==
|
||||
// @name Extended player profile
|
||||
// @version 1.0.1
|
||||
// @version 1.0.2
|
||||
// @description Adds additional info and actions to a player's profile.
|
||||
// @author Dawid Wysokiński - Kichiyaki - contact@dwysokinski.me
|
||||
// @match https://*/game.php?*screen=info_player*
|
||||
// @downloadURL ${process.env.PUBLIC_URL}/userscripts/extendedPlayerProfile.js
|
||||
// @updateURL ${process.env.PUBLIC_URL}/userscripts/extendedPlayerProfile.js
|
||||
// @downloadURL ${process.env.PUBLIC_URL}/extended-player-profile.user.js
|
||||
// @updateURL ${process.env.PUBLIC_URL}/extended-player-profile.user.js
|
||||
// @icon https://www.google.com/s2/favicons?domain=plemiona.pl
|
||||
// @grant none
|
||||
// @run-at document-end
|
||||
// ==/UserScript==
|
||||
`,
|
||||
// ==/UserScript==`,
|
||||
};
|
||||
|
||||
const preamble = preambles[process.env.PREAMBLE];
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
file_server
|
||||
header -Server
|
||||
header Cache-Control max-age=3600
|
||||
header /quickbar/*.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"
|
||||
header /*.js Content-type "text/javascript; charset=UTF-8"
|
||||
redir /userscripts/extendedPlayerProfile.js /extended-player-profile.user.js permanent
|
||||
}
|
||||
|
|
15
package.json
15
package.json
|
@ -3,14 +3,19 @@
|
|||
"version": "0.1.0",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build-userscript": "PUBLIC_URL=https://scripts.tribalwarshelp.com parcel build --dist-dir dist/userscripts",
|
||||
"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-userscript src/extendedPlayerProfile.ts",
|
||||
"build:quickbar:extended-player-profile": "yarn build-quickbar src/extendedPlayerProfile.ts",
|
||||
"build-single": "PUBLIC_URL=https://scripts.tribalwarshelp.com parcel build",
|
||||
"build:userscript:extended-player-profile": "PREAMBLE=extended-player-profile yarn build-single ./src/extended-player-profile.user.ts",
|
||||
"build:quickbar:extended-player-profile": "yarn build-single ./src/extended-player-profile.quickbar.ts",
|
||||
"build:userscript": "npm-run-all build:userscript:*",
|
||||
"build:quickbar": "npm-run-all build:quickbar:*",
|
||||
"build": "npm-run-all build:*"
|
||||
},
|
||||
"targets": {
|
||||
"default": {
|
||||
"distDir": "./dist",
|
||||
"sourceMap": false
|
||||
}
|
||||
},
|
||||
"author": {
|
||||
"name": "Dawid Wysokiński",
|
||||
"email": "contact@dwysokinski.me",
|
||||
|
@ -26,7 +31,7 @@
|
|||
"buffer": "^5.5.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"parcel": "^2.8.1",
|
||||
"prettier": "^2.8.1",
|
||||
"prettier": "^2.8.3",
|
||||
"typescript": "^4.9.4"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
// Parcel doesn't have an option to rename output files
|
||||
import './extended-player-profile.user';
|
|
@ -1,7 +1,7 @@
|
|||
// Extended player profile
|
||||
|
||||
import { Player, PlayerSnapshot, TWHelpClient } from './lib/twhelp';
|
||||
import { DialogTable } from './common/DialogTable';
|
||||
import { DialogTable } from './common/dialog-table';
|
||||
import { InADayClient } from './lib/tw';
|
||||
import { createTranslationFunc } from './utils';
|
||||
|
|
@ -1743,10 +1743,10 @@ posthtml@^0.16.4, posthtml@^0.16.5:
|
|||
posthtml-parser "^0.11.0"
|
||||
posthtml-render "^3.0.0"
|
||||
|
||||
prettier@^2.8.1:
|
||||
version "2.8.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc"
|
||||
integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==
|
||||
prettier@^2.8.3:
|
||||
version "2.8.3"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632"
|
||||
integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==
|
||||
|
||||
proxy-from-env@^1.1.0:
|
||||
version "1.1.0"
|
||||
|
|
Loading…
Reference in New Issue