Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions _scripts/patch-shaka-player-loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* fixes shaka-player referencing the Roboto font on google fonts in its CSS
* by updating the CSS to point to the local Roboto font
* @param {string} source
*/
module.exports = function (source) {
return source.replace(/@font-face{font-family:Roboto;[^}]+}/, '')
}
33 changes: 0 additions & 33 deletions _scripts/patchShaka.mjs

This file was deleted.

6 changes: 6 additions & 0 deletions _scripts/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ const config = {
}
}
],
rules: [
{
resource: path.resolve(__dirname, '../node_modules/shaka-player/dist/controls.css'),
use: path.join(__dirname, 'patch-shaka-player-loader.js')
}
],
},
{
test: /\.(png|jpe?g|gif|tif?f|bmp|webp|svg)(\?.*)?$/,
Expand Down
6 changes: 6 additions & 0 deletions _scripts/webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ const config = {
}
}
],
rules: [
{
resource: path.resolve(__dirname, '../node_modules/shaka-player/dist/controls.css'),
use: path.join(__dirname, 'patch-shaka-player-loader.js')
}
],
},
{
test: /\.html$/,
Expand Down
14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,17 @@
"url": "https://github.com/FreeTubeApp/FreeTube/issues"
},
"scripts": {
"build": "run-s patch-shaka pack build-release",
"build:arm64": "run-s patch-shaka pack build-release:arm64",
"build:arm32": "run-s patch-shaka pack build-release:arm32",
"build": "run-s pack build-release",
"build:arm64": "run-s pack build-release:arm64",
"build:arm32": "run-s pack build-release:arm32",
"build-release": "node _scripts/build.mjs",
"build-release:arm64": "node _scripts/build.mjs arm64",
"build-release:arm32": "node _scripts/build.mjs arm32",
"clean": "node _scripts/clean.mjs",
"debug": "run-s patch-shaka debug-runner",
"debug-runner": "node _scripts/dev-runner.js --remote-debug",
"dev": "run-s patch-shaka dev-runner",
"debug": "node _scripts/dev-runner.js --remote-debug",
"dev": "node _scripts/dev-runner.js",
"dev:web": "node _scripts/dev-runner.js --web",
"dev-runner": "node _scripts/dev-runner.js",
"get-instances": "node _scripts/getInstances.js",
"patch-shaka": "node _scripts/patchShaka.mjs",
"get-regions": "node _scripts/getRegions.mjs",
"lint-all": "run-p lint lint-json",
"lint": "run-p eslint-lint lint-style",
Expand All @@ -49,7 +46,6 @@
"pack:preload": "webpack --mode=production --node-env=production --config _scripts/webpack.preload.config.js",
"pack:web": "webpack --mode=production --node-env=production --config _scripts/webpack.web.config.js",
"pack:botGuardScript": "webpack --config _scripts/webpack.botGuardScript.config.js",
"postinstall": "yarn run --silent patch-shaka",
"checkforbadtemplates": "node _scripts/findMissingTemplates.mjs",
"ci": "yarn install --silent --frozen-lockfile --network-concurrency 1"
},
Expand Down