mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-13 02:49:58 +00:00
Move main.ts -> background/background.ts
This commit is contained in:
@@ -1,25 +1,25 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
import defaultOptions from "./defaultOptions";
|
import defaultOptions from "../defaultOptions";
|
||||||
import loadSender from "./lib/loadSender";
|
import loadSender from "../lib/loadSender";
|
||||||
import options, { Options } from "./lib/options";
|
import options, { Options } from "../lib/options";
|
||||||
|
|
||||||
import { getChromeUserAgent } from "./lib/userAgents";
|
import { getChromeUserAgent } from "../lib/userAgents";
|
||||||
import { stringify } from "./lib/utils";
|
import { stringify } from "../lib/utils";
|
||||||
|
|
||||||
import { Message } from "./types";
|
import { Message } from "../types";
|
||||||
|
|
||||||
import { CAST_FRAMEWORK_LOADER_SCRIPT_URL
|
import { CAST_FRAMEWORK_LOADER_SCRIPT_URL
|
||||||
, CAST_LOADER_SCRIPT_URL } from "./lib/endpoints";
|
, CAST_LOADER_SCRIPT_URL } from "../lib/endpoints";
|
||||||
|
|
||||||
import { ReceiverSelectorMediaType } from "./background/receiverSelector";
|
import { ReceiverSelectorMediaType } from "./receiverSelector";
|
||||||
|
|
||||||
import ReceiverSelectorManager
|
import ReceiverSelectorManager
|
||||||
from "./background/receiverSelector/ReceiverSelectorManager";
|
from "./receiverSelector/ReceiverSelectorManager";
|
||||||
|
|
||||||
import createMenus from "./background/createMenus";
|
import createMenus from "./createMenus";
|
||||||
import ShimManager from "./background/ShimManager";
|
import ShimManager from "./ShimManager";
|
||||||
import StatusManager from "./background/StatusManager";
|
import StatusManager from "./StatusManager";
|
||||||
|
|
||||||
|
|
||||||
const _ = browser.i18n.getMessage;
|
const _ = browser.i18n.getMessage;
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
, "background": {
|
, "background": {
|
||||||
"scripts": [ "main.js" ]
|
"scripts": [ "background.js" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
, "content_scripts": [
|
, "content_scripts": [
|
||||||
|
|||||||
@@ -12,11 +12,7 @@ const sourceFileExtensions = [
|
|||||||
|
|
||||||
module.exports = (env) => ({
|
module.exports = (env) => ({
|
||||||
entry: {
|
entry: {
|
||||||
"main": `${env.includePath}/main.ts`
|
"background": `${env.includePath}/background/background.ts`
|
||||||
|
|
||||||
// UI
|
|
||||||
, "ui/popup/bundle": `${env.includePath}/ui/popup/index.tsx`
|
|
||||||
, "ui/options/bundle": `${env.includePath}/ui/options/index.tsx`
|
|
||||||
|
|
||||||
// Sender apps
|
// Sender apps
|
||||||
, "senders/mediaCast": `${env.includePath}/senders/mediaCast.ts`
|
, "senders/mediaCast": `${env.includePath}/senders/mediaCast.ts`
|
||||||
@@ -26,6 +22,10 @@ module.exports = (env) => ({
|
|||||||
, "shim/bundle": `${env.includePath}/shim/index.ts`
|
, "shim/bundle": `${env.includePath}/shim/index.ts`
|
||||||
, "shim/content": `${env.includePath}/shim/content.ts`
|
, "shim/content": `${env.includePath}/shim/content.ts`
|
||||||
, "shim/contentBridge": `${env.includePath}/shim/contentBridge.ts`
|
, "shim/contentBridge": `${env.includePath}/shim/contentBridge.ts`
|
||||||
|
|
||||||
|
// UI
|
||||||
|
, "ui/popup/bundle": `${env.includePath}/ui/popup/index.tsx`
|
||||||
|
, "ui/options/bundle": `${env.includePath}/ui/options/index.tsx`
|
||||||
}
|
}
|
||||||
, output: {
|
, output: {
|
||||||
filename: "[name].js"
|
filename: "[name].js"
|
||||||
|
|||||||
Reference in New Issue
Block a user