web: Rename public_path to publicPath

This commit is contained in:
Nathan Adams 2020-11-17 23:16:55 +01:00 committed by Mike Welsh
parent bccdaf77d4
commit 41bf30efc8
3 changed files with 6 additions and 6 deletions

View File

@ -1,17 +1,17 @@
import { RuffleObject } from "./ruffle-object";
import { RuffleEmbed } from "./ruffle-embed";
import { install_plugin, FLASH_PLUGIN } from "./plugin-polyfill";
import { public_path } from "./public-path";
import { publicPath } from "./public-path";
import { Config } from "./config";
if (!window.RufflePlayer) {
window.RufflePlayer = {};
}
let topLevelRuffleConfig: Config;
let ruffleScriptSrc = public_path({}, "ruffle.js");
let ruffleScriptSrc = publicPath({}, "ruffle.js");
if (window.RufflePlayer.config) {
topLevelRuffleConfig = window.RufflePlayer.config;
ruffleScriptSrc = public_path(window.RufflePlayer.config, "ruffle.js");
ruffleScriptSrc = publicPath(window.RufflePlayer.config, "ruffle.js");
}
/* public_path returns the directory where the file is, *
* so we need to append the filename. We don't need to *

View File

@ -20,7 +20,7 @@ import { Config } from "./config";
* @param source_name The name of the source.
* @returns The public path for the given source.
*/
export function public_path(config: Config, source_name: string): string {
export function publicPath(config: Config, source_name: string): string {
let path = "";
if (
config !== undefined &&

View File

@ -1,8 +1,8 @@
const { PublicAPI, SourceAPI, public_path } = require("ruffle-core");
const { PublicAPI, SourceAPI, publicPath } = require("ruffle-core");
window.RufflePlayer = PublicAPI.negotiate(
window.RufflePlayer,
"local",
new SourceAPI("local")
);
__webpack_public_path__ = public_path(window.RufflePlayer.config, "local");
__webpack_public_path__ = publicPath(window.RufflePlayer.config, "local");