web: Rename public_path to publicPath
This commit is contained in:
parent
bccdaf77d4
commit
41bf30efc8
|
@ -1,17 +1,17 @@
|
||||||
import { RuffleObject } from "./ruffle-object";
|
import { RuffleObject } from "./ruffle-object";
|
||||||
import { RuffleEmbed } from "./ruffle-embed";
|
import { RuffleEmbed } from "./ruffle-embed";
|
||||||
import { install_plugin, FLASH_PLUGIN } from "./plugin-polyfill";
|
import { install_plugin, FLASH_PLUGIN } from "./plugin-polyfill";
|
||||||
import { public_path } from "./public-path";
|
import { publicPath } from "./public-path";
|
||||||
import { Config } from "./config";
|
import { Config } from "./config";
|
||||||
|
|
||||||
if (!window.RufflePlayer) {
|
if (!window.RufflePlayer) {
|
||||||
window.RufflePlayer = {};
|
window.RufflePlayer = {};
|
||||||
}
|
}
|
||||||
let topLevelRuffleConfig: Config;
|
let topLevelRuffleConfig: Config;
|
||||||
let ruffleScriptSrc = public_path({}, "ruffle.js");
|
let ruffleScriptSrc = publicPath({}, "ruffle.js");
|
||||||
if (window.RufflePlayer.config) {
|
if (window.RufflePlayer.config) {
|
||||||
topLevelRuffleConfig = 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, *
|
/* public_path returns the directory where the file is, *
|
||||||
* so we need to append the filename. We don't need to *
|
* so we need to append the filename. We don't need to *
|
||||||
|
|
|
@ -20,7 +20,7 @@ import { Config } from "./config";
|
||||||
* @param source_name The name of the source.
|
* @param source_name The name of the source.
|
||||||
* @returns The public path for the given 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 = "";
|
let path = "";
|
||||||
if (
|
if (
|
||||||
config !== undefined &&
|
config !== undefined &&
|
||||||
|
|
|
@ -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 = PublicAPI.negotiate(
|
||||||
window.RufflePlayer,
|
window.RufflePlayer,
|
||||||
"local",
|
"local",
|
||||||
new SourceAPI("local")
|
new SourceAPI("local")
|
||||||
);
|
);
|
||||||
__webpack_public_path__ = public_path(window.RufflePlayer.config, "local");
|
__webpack_public_path__ = publicPath(window.RufflePlayer.config, "local");
|
||||||
|
|
Loading…
Reference in New Issue